File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -64,7 +64,14 @@ export class Release {
6464 const prevResult = await sshExec ( this . connection , `readlink "${ stackDir } /current" 2>/dev/null || echo ""` ) ;
6565 const previousSymlink = prevResult . stdout . trim ( ) || null ;
6666
67- await sshExec ( this . connection , `mkdir -p "${ dir } "` ) ;
67+ const mkdirResult = await sshExec ( this . connection , `mkdir -p "${ dir } "` ) ;
68+ if ( mkdirResult . exitCode !== 0 ) {
69+ throw new DeployError (
70+ `Failed to create release directory ${ dir } : ${ mkdirResult . stderr . trim ( ) || `exit ${ mkdirResult . exitCode } ` } ` ,
71+ ErrorCode . DEPLOY_FAILED ,
72+ `Ensure the deploy user has write access to ${ stackDir } . Run once as root:\n mkdir -p '${ stackDir } ' && chown ${ this . connection . user } : '${ stackDir } '` ,
73+ ) ;
74+ }
6875
6976 // Write compose and metadata via stdin (no shell escaping needed)
7077 const [ composeHandle , metaHandle ] = await Promise . all ( [
You can’t perform that action at this time.
0 commit comments