Skip to content

Commit 09c2cd8

Browse files
abetomoDeviaVir
authored andcommitted
Fix to deprecated the configFile option in the pacakage command (#344)
Even if you specify it in the current specification, nothing has any effect. Therefore, I thought that it might be good to abolish it, but how about you? Since sudden deletion has a big influence, we have issued a warning once.
1 parent 1be5fd0 commit 09c2cd8

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

bin/node-lambda

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,7 @@ program
107107
AWS_ENVIRONMENT)
108108
.option('-x, --excludeGlobs [' + EXCLUDE_GLOBS + ']',
109109
'Space-separated glob pattern(s) for additional exclude files (e.g. "event.json dotenv.sample")', EXCLUDE_GLOBS)
110-
.option('-f, --configFile [' + CONFIG_FILE + ']',
111-
'Path to file holding secret environment variables (e.g. "deploy.env")', CONFIG_FILE)
110+
.option('-f, --configFile [' + CONFIG_FILE + ']', '!!! Deprecated option in package command !!!', CONFIG_FILE)
112111
.option('-D, --prebuiltDirectory [' + PREBUILT_DIRECTORY + ']', 'Prebuilt directory', PREBUILT_DIRECTORY)
113112
.action((prg) => lambda.package(prg))
114113

lib/main.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -689,6 +689,9 @@ Lambda.prototype._updateScheduleEvents = (scheduleEvents, functionArn, scheduleL
689689
}
690690

691691
Lambda.prototype.package = function (program) {
692+
if (program.configFile) {
693+
console.warn('[Warning] -f, --configFile option of the `package` command is deprecated.')
694+
}
692695
const _this = this
693696
if (!program.packageDirectory) {
694697
throw new Error('packageDirectory not specified!')

0 commit comments

Comments
 (0)