@@ -55,16 +55,16 @@ class RustPlugin {
55
55
}
56
56
57
57
runDocker ( funcArgs , cargoPackage , binary , profile ) {
58
- const cargoHome = process . env . CARGO_HOME || path . join ( homedir ( ) , ' .cargo' ) ;
59
- const cargoRegistry = path . join ( cargoHome , ' registry' ) ;
60
- const cargoDownloads = path . join ( cargoHome , ' git' ) ;
58
+ const cargoHome = process . env . CARGO_HOME || path . join ( homedir ( ) , " .cargo" ) ;
59
+ const cargoRegistry = path . join ( cargoHome , " registry" ) ;
60
+ const cargoDownloads = path . join ( cargoHome , " git" ) ;
61
61
62
- const dockerCLI = process . env [ ' SLS_DOCKER_CLI' ] || ' docker' ;
62
+ const dockerCLI = process . env [ " SLS_DOCKER_CLI" ] || " docker" ;
63
63
const defaultArgs = [
64
- ' run' ,
65
- ' --rm' ,
66
- '-t' ,
67
- '-e' ,
64
+ " run" ,
65
+ " --rm" ,
66
+ "-t" ,
67
+ "-e" ,
68
68
`BIN=${ binary } ` ,
69
69
`-v` ,
70
70
`${ this . dockerPath } :/code` ,
@@ -73,12 +73,12 @@ class RustPlugin {
73
73
`-v` ,
74
74
`${ cargoDownloads } :/root/.cargo/git`
75
75
] ;
76
- const customArgs = ( process . env [ ' SLS_DOCKER_ARGS' ] || '' ) . split ( ' ' ) || [ ] ;
76
+ const customArgs = ( process . env [ " SLS_DOCKER_ARGS" ] || "" ) . split ( " " ) || [ ] ;
77
77
78
78
let cargoFlags = ( funcArgs || { } ) . cargoFlags || this . custom . cargoFlags ;
79
79
if ( profile ) {
80
80
// release or dev
81
- customArgs . push ( '-e' , `PROFILE=${ profile } ` ) ;
81
+ customArgs . push ( "-e" , `PROFILE=${ profile } ` ) ;
82
82
}
83
83
if ( cargoPackage != undefined ) {
84
84
if ( cargoFlags ) {
@@ -89,7 +89,7 @@ class RustPlugin {
89
89
}
90
90
if ( cargoFlags ) {
91
91
// --features awesome-feature, ect
92
- customArgs . push ( '-e' , `CARGO_FLAGS=${ cargoFlags } ` ) ;
92
+ customArgs . push ( "-e" , `CARGO_FLAGS=${ cargoFlags } ` ) ;
93
93
}
94
94
const dockerTag = ( funcArgs || { } ) . dockerTag || this . custom . dockerTag ;
95
95
const dockerImage = ( funcArgs || { } ) . dockerImage || this . custom . dockerImage ;
0 commit comments