diff --git a/packages/cli/CHANGELOG.md b/packages/cli/CHANGELOG.md index fa04d2bb0..435f622d6 100644 --- a/packages/cli/CHANGELOG.md +++ b/packages/cli/CHANGELOG.md @@ -1,5 +1,11 @@ # @openfn/cli +## 1.8.8 + +### Patch Changes + +- 1f13d8f: Resolved an issue where the `-p` (project path) flag was ignored in the `deploy` command, causing the CLI to default to `project.yaml` instead of the specified file. + ## 1.8.7 ### Patch Changes diff --git a/packages/cli/package.json b/packages/cli/package.json index be146a38b..e8bb0051a 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@openfn/cli", - "version": "1.8.7", + "version": "1.8.8", "description": "CLI devtools for the openfn toolchain.", "engines": { "node": ">=18", diff --git a/packages/cli/src/deploy/handler.ts b/packages/cli/src/deploy/handler.ts index 4af1e5502..25bc6c773 100644 --- a/packages/cli/src/deploy/handler.ts +++ b/packages/cli/src/deploy/handler.ts @@ -76,6 +76,7 @@ function mergeOverrides( apiKey: pickFirst(process.env['OPENFN_API_KEY'], config.apiKey), endpoint: pickFirst(process.env['OPENFN_ENDPOINT'], config.endpoint), statePath: pickFirst(options.statePath, config.statePath), + specPath: pickFirst(options.projectPath, config.specPath), configPath: options.configPath, requireConfirmation: pickFirst(options.confirm, config.requireConfirmation), }; diff --git a/packages/cli/test/deploy/options.test.ts b/packages/cli/test/deploy/options.test.ts index abb2ee4a2..46be79900 100644 --- a/packages/cli/test/deploy/options.test.ts +++ b/packages/cli/test/deploy/options.test.ts @@ -36,3 +36,13 @@ test('pass a config path (shortform)', (t) => { const options = parse('deploy -c other_config.json'); t.deepEqual(options.configPath, 'other_config.json'); }); + +test('pass a spec path (longform)', (t) => { + const options = parse('deploy --project-path test-project.yaml'); + t.deepEqual(options.projectPath, 'test-project.yaml'); +}); + +test('pass a spec path (shortform)', (t) => { + const options = parse('deploy -p test-project.yaml'); + t.deepEqual(options.projectPath, 'test-project.yaml'); +});