Skip to content

Commit

Permalink
Revert "exit with the exit code from a app when run()" (#71)
Browse files Browse the repository at this point in the history
* Revert "exit with the exit code from a app when run()"
  • Loading branch information
vsoch authored Jan 25, 2024
1 parent 78c2712 commit 2b9208a
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 56 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ represented by the pull requests that fixed them.
Versions in parentheses coincide with what is available on [pypi](https://pypi.org/project/scif/).

## [xxx](https://github.com/vsoch/scif/tree/master) (master)
- return exit code of app in run command (0.0.82)
- revert exit code to app.run until further notice (0.0.83)
- add exit code to app.run (0.0.82)
- install return value non zero should stop build (0.0.81)
- removing Python less than 3.6 support (0.0.80)
- code formatting with black, shell entrypoint bug (0.0.79)
Expand Down
25 changes: 0 additions & 25 deletions docs/examples/exit-from-run/README.md

This file was deleted.

19 changes: 0 additions & 19 deletions docs/examples/exit-from-run/apptainer.def

This file was deleted.

7 changes: 0 additions & 7 deletions docs/examples/exit-from-run/recipe.scif

This file was deleted.

10 changes: 7 additions & 3 deletions scif/main/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,13 @@ def _exec(self, app=None, interactive=False, exit=False):
sys.exit(result["return_code"])
else:
os.system("".join(cmd))

else:
cmd = cmd.split(" ")
result = self._run_command(cmd=cmd, spinner=False, quiet=False)
sys.exit(result["return_code"])
for line in os.popen(cmd):
try:
print(line.rstrip())
except:
print(line.rstrip().encode(loc))


def execute(self, app, cmd=None, args=None):
Expand Down Expand Up @@ -170,6 +173,7 @@ def run(self, app=None, args=None):
# updates environment
# sets entrypoint
# sets entryfolder

return self._exec(app, interactive=interactive)


Expand Down
2 changes: 1 addition & 1 deletion scif/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"""

__version__ = "0.0.82"
__version__ = "0.0.83"
AUTHOR = "Vanessa Sochat"
AUTHOR_EMAIL = "vsochat@stanford.edu"
NAME = "scif"
Expand Down

0 comments on commit 2b9208a

Please sign in to comment.