File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed
Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -360,12 +360,20 @@ const Terminal = {
360360 excludePaths . splice ( excludePaths . indexOf ( "alpine/data" ) , 1 ) ;
361361 }
362362 if ( opts . home ) {
363- includeFiles . push ( "public" ) ;
363+ const checkCmd = `test -e "$PREFIX/public" && echo "exists" || echo "not"` ;
364+ const checkResult = await Executor . execute ( checkCmd ) ;
365+ if ( checkResult === "exists" ) {
366+ includeFiles . push ( "public" ) ;
367+ }
364368 }
365369 } else {
366370 // If alpineBase is disabled, only include public if home is enabled
367371 if ( opts . home ) {
368- includeFiles . push ( "public" ) ;
372+ const checkCmd = `test -e "$PREFIX/public" && echo "exists" || echo "not"` ;
373+ const checkResult = await Executor . execute ( checkCmd ) ;
374+ if ( checkResult === "exists" ) {
375+ includeFiles . push ( "public" ) ;
376+ }
369377 }
370378 }
371379
@@ -392,7 +400,7 @@ const Terminal = {
392400
393401 const result = await Executor . execute ( cmd ) ;
394402 if ( result === "ok" ) {
395- resolve ( cordova . file . dataDirectory + "aterm_backup.tar" ) ;
403+ resolve ( cordova . file . dataDirectory + "usr/ aterm_backup.tar" ) ;
396404 } else {
397405 reject ( result ) ;
398406 }
You can’t perform that action at this time.
0 commit comments