Skip to content

Commit

Permalink
fix: Remove path normalization at arg parser level; now handled in cm…
Browse files Browse the repository at this point in the history
…d/run.js
  • Loading branch information
sbeesm committed Jan 23, 2024
1 parent 9dc5b59 commit 13af82f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 14 deletions.
2 changes: 1 addition & 1 deletion src/program.js
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ Example: $0 --help run.
default: process.cwd(),
requiresArg: true,
type: 'string',
coerce: (arg) => (arg != null ? path.resolve(arg) : undefined),
coerce: (arg) => arg ?? undefined,
},
'artifacts-dir': {
alias: 'a',
Expand Down
13 changes: 0 additions & 13 deletions tests/unit/test.program.js
Original file line number Diff line number Diff line change
Expand Up @@ -481,19 +481,6 @@ describe('program.main', () => {
sinon.assert.calledWith(fakeVersionGetter, projectRoot);
});

it('turns sourceDir into an absolute path', () => {
const fakeCommands = fake(commands, {
build: () => Promise.resolve(),
});
return execProgram(['build', '--source-dir', '..'], {
commands: fakeCommands,
}).then(() => {
sinon.assert.calledWithMatch(fakeCommands.build, {
sourceDir: path.resolve(path.join(process.cwd(), '..')),
});
});
});

it('normalizes the artifactsDir path', () => {
const fakeCommands = fake(commands, {
build: () => Promise.resolve(),
Expand Down

0 comments on commit 13af82f

Please sign in to comment.