Skip to content

Commit

Permalink
Return the return code from the shell.
Browse files Browse the repository at this point in the history
Signed-off-by: Pablo <[email protected]>
  • Loading branch information
pablochacin authored and jbuck committed Feb 17, 2018
1 parent 7d8a6b4 commit 671e984
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion bin/assume-aws-role.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,13 @@ STS.assumeRole({
modEnv.PS1 = "(assume-aws-role " + command + ")$ ";
modEnv.ASSUME_AWS_ROLE = command;

spawn(process.env.SHELL, {
var sh = spawn(process.env.SHELL, {
env: modEnv,
stdio: "inherit"
});

sh.on('close',(code)=>{
process.exit(code);
});

});

0 comments on commit 671e984

Please sign in to comment.