@@ -67,8 +67,6 @@ class PkgPyFuncs {
67
67
} ) ;
68
68
69
69
const info = _ . map ( functions , ( target ) => {
70
-
71
-
72
70
return {
73
71
name : target . name ,
74
72
includes : target . package . include ,
@@ -122,7 +120,8 @@ class PkgPyFuncs {
122
120
if ( this . abortOnPackagingErrors ) {
123
121
const countErrorNewLines = errorText . split ( '\n' ) . length
124
122
125
- if ( countErrorNewLines < 2 && errorText . toLowerCase ( ) . includes ( 'git clone' ) ) {
123
+
124
+ if ( ! errorText . includes ( "ERROR:" ) && countErrorNewLines < 2 && errorText . toLowerCase ( ) . includes ( 'git clone' ) ) {
126
125
// Ignore false positive due to pip git clone printing to stderr
127
126
} else if ( errorText . toLowerCase ( ) . includes ( 'warning' ) && ! errorText . toLowerCase ( ) . includes ( 'error' ) ) {
128
127
// Ignore warnings
@@ -162,17 +161,19 @@ class PkgPyFuncs {
162
161
163
162
if ( out === this . containerName ) {
164
163
this . log ( 'Container already exists. Reusing.' )
165
- } else {
166
- let args = [ 'run' , '--rm' , '-dt' , '-v' , `${ process . cwd ( ) } :${ this . dockerServicePath } ` ]
167
-
168
- if ( this . mountSSH ) {
169
- args = args . concat ( [ '-v' , `${ process . env . HOME } /.ssh:/root/.ssh` ] )
170
- }
164
+ let out = this . runProcess ( 'docker' , [ 'kill' , `${ this . containerName } ` ] )
165
+ this . log ( out )
166
+ }
167
+
168
+ let args = [ 'run' , '--rm' , '-dt' , '-v' , `${ process . cwd ( ) } :${ this . dockerServicePath } ` ]
171
169
172
- args = args . concat ( [ '--name' , this . containerName , this . dockerImage , 'bash' ] )
173
- this . runProcess ( 'docker' , args )
174
- this . log ( 'Container created' )
170
+ if ( this . mountSSH ) {
171
+ args = args . concat ( [ '-v' , `${ process . env . HOME } /.ssh:/root/.ssh` ] )
175
172
}
173
+
174
+ args = args . concat ( [ '--name' , this . containerName , this . dockerImage , 'bash' ] )
175
+ this . runProcess ( 'docker' , args )
176
+ this . log ( 'Container created' )
176
177
}
177
178
178
179
ensureImage ( ) {
@@ -213,7 +214,7 @@ class PkgPyFuncs {
213
214
if ( this . globalRequirements ) {
214
215
requirements = _ . concat ( requirements , this . globalRequirements )
215
216
}
216
- _ . forEach ( requirements , ( req ) => { this . installRequirements ( buildPath , req ) } )
217
+ _ . forEach ( requirements , ( req ) => { this . installRequirements ( buildPath , req ) } )
217
218
zipper . sync . zip ( buildPath ) . compress ( ) . save ( `${ buildPath } .zip` )
218
219
}
219
220
0 commit comments