fix windows paths
fix #6427 Signed-off-by: Rogerio Angeliski <angeliski@hotmail.com>
This commit is contained in:
+2
-1
@@ -56,6 +56,7 @@ export type RailsRunOptions = {
|
||||
export const railsArgumentResolver = (
|
||||
projectRoot: string,
|
||||
options: RailsRunOptions,
|
||||
executionOnContainer = false,
|
||||
): string[] => {
|
||||
const argumentsToRun: string[] = [];
|
||||
|
||||
@@ -103,7 +104,7 @@ export const railsArgumentResolver = (
|
||||
argumentsToRun.push(
|
||||
options.template.replace(
|
||||
`.${separatorPath}`,
|
||||
`${projectRoot}${separatorPath}`,
|
||||
`${projectRoot}${executionOnContainer ? '/' : separatorPath}`,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
+2
-2
@@ -137,7 +137,7 @@ describe('Rails Templater', () => {
|
||||
owner: 'angeliski',
|
||||
storePath: 'https://github.com/angeliski/rails-project',
|
||||
name: 'rails-project',
|
||||
railsArguments: { template: './something.rb' },
|
||||
railsArguments: { template: `.${path.sep}something.rb` },
|
||||
imageName: 'foo/rails-custom-image',
|
||||
};
|
||||
|
||||
@@ -210,7 +210,7 @@ describe('Rails Templater', () => {
|
||||
owner: 'angeliski',
|
||||
storePath: 'https://github.com/angeliski/rails-project',
|
||||
name: 'rails-project',
|
||||
railsArguments: { template: './something.rb' },
|
||||
railsArguments: { template: `.${path.sep}something.rb` },
|
||||
imageName: 'foo/rails-custom-image',
|
||||
};
|
||||
|
||||
|
||||
@@ -68,7 +68,7 @@ export class RailsNewRunner {
|
||||
command: baseCommand,
|
||||
args: [
|
||||
...baseArguments,
|
||||
`${intermediateDir}/${name}`,
|
||||
`${intermediateDir}${path.sep}${name}`,
|
||||
...arrayExtraArguments,
|
||||
],
|
||||
logStream,
|
||||
@@ -77,6 +77,7 @@ export class RailsNewRunner {
|
||||
const arrayExtraArguments = railsArgumentResolver(
|
||||
'/input',
|
||||
railsArguments as RailsRunOptions,
|
||||
true,
|
||||
);
|
||||
await this.containerRunner.runContainer({
|
||||
imageName: imageName as string,
|
||||
|
||||
Reference in New Issue
Block a user