Skip to content

Commit

Permalink
Fix #347 - Close stanek.js tail window upon completion
Browse files Browse the repository at this point in the history
  • Loading branch information
alainbryden committed Oct 3, 2024
1 parent c37fb14 commit 40362c6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions stanek.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,11 @@ export async function main(ns) {
completionScript = defaultCompletionScript;
if (completionArgs.length == 0) completionArgs = defaultCompletionArgs;
}
if (ns.run(completionScript, 1, ...completionArgs))
if (ns.run(completionScript, 1, ...completionArgs)) {
log(ns, `INFO: Stanek.js shutting down and launching ${completionScript}...`, false, 'info');
else
if (!options['no-tail'])
ns.closeTail(); // Close the tail window if we opened it
} else
log(ns, `WARNING: Stanek.js shutting down, but failed to launch ${completionScript}...`, false, 'warning');
}

Expand Down

0 comments on commit 40362c6

Please sign in to comment.