Commit 4a25411 Ben Gowers
committed
1 parent 846f2cb commit 4a25411 Copy full SHA for 4a25411
File tree 2 files changed +7
-2
lines changed
2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -33,10 +33,11 @@ program
33
33
. option ( "--sam" , "use the SAM framework to execute commands" )
34
34
. option ( "-c, --ci" , "ci mode for sls-dev-guardian checks" )
35
35
. option ( "--mfa <mfa>" , "mfa token for profiles with mfa authentication" )
36
+ . ignoreUnknownOptions ( )
36
37
. parse ( process . argv ) ;
37
38
38
39
program . location = program . location || process . cwd ( ) ;
39
- const SLS = new Serverless ( program . location ) ;
40
+ const SLS = new Serverless ( program ) ;
40
41
if ( ! program . stage ) {
41
42
program . stage = SLS . getStage ( ) ;
42
43
}
Original file line number Diff line number Diff line change
1
+ import transformArgsToDict from "../utils/transformArgsToDict" ;
2
+
1
3
const fs = require ( "fs" ) ;
2
4
const path = require ( "path" ) ;
3
5
const YAML = require ( "js-yaml" ) ;
4
6
5
7
class Serverless {
6
- constructor ( location ) {
8
+ constructor ( program ) {
9
+ const { argv, location } = program ;
10
+ const options = transformArgsToDict ( argv ) ;
7
11
const ymlPath = path . join ( location , "serverless.yml" ) ;
8
12
const yamlPath = path . join ( location , "serverless.yaml" ) ;
9
13
const jsonPath = path . join ( location , "serverless.json" ) ;
You can’t perform that action at this time.
0 commit comments