Skip to content

Commit

Permalink
fix: ensure proper env prefix (#2260)
Browse files Browse the repository at this point in the history
fixes #2259
  • Loading branch information
tripodsan authored Oct 18, 2023
1 parent e274252 commit 29a42ba
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ export default class CLI {
.scriptName('aem')
.usage('Usage: $0 <command> [options]')
.parserConfiguration({ 'camel-case-expansion': false })
.env('AEM')
.env('AEM_')
.check((a) => envAwareStrict(a, argv.parsed.aliases))
.showHelpOnFail(true)
.fail(this._failFn)
Expand Down
4 changes: 4 additions & 0 deletions test/fixtures/all.env
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
#
# env file for testing that contains all possible and impossible values
#
# ignored
AEMCOMPANIONPATH=foobar
AEM_COMPANIONPATH=foobar

# global
AEM_LOG_LEVEL=debug
Expand All @@ -13,6 +16,7 @@ AEM_TARGET=foo
AEM_FILES=*.htl,*.js

# up
AEM_PRINT_INDEX=true
AEM_HOST=www.project-helix.io
AEM_OPEN=false
AEM_LIVERELOAD=false
Expand Down
1 change: 1 addition & 0 deletions test/up-cli.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ describe('hlx up', () => {
sinon.assert.calledWith(mockUp.withLiveReload, false);
sinon.assert.calledWith(mockUp.withHttpPort, 1234);
sinon.assert.calledWith(mockUp.withBindAddr, '*');
sinon.assert.calledWith(mockUp.withPrintIndex, true);
sinon.assert.calledOnce(mockUp.run);
});

Expand Down

0 comments on commit 29a42ba

Please sign in to comment.