diff --git a/CHANGELOG.md b/CHANGELOG.md index 93ba256..e1d5fcf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ The client here will eventually be released as "spython" (and eventually to singularity on pypi), and the versions here will coincide with these releases. ## [master](https://github.com/singularityhub/singularity-cli/tree/master) + - add stream_type to 'run' command like in 'exec' (0.3.14) - do not modify user provided instance name when generating new instance (0.3.13) - bug with instance.run_command (0.3.12) - added check to enbsure stderr exists upon a non-zero return code when streaming (0.3.11) diff --git a/spython/main/run.py b/spython/main/run.py index 1299b9f..db7a25b 100644 --- a/spython/main/run.py +++ b/spython/main/run.py @@ -26,6 +26,7 @@ def run( return_result=False, quiet=False, background=False, + stream_type="stdout", ): """ run will run the container, with or withour arguments (which @@ -49,6 +50,7 @@ def run( return_result: if True, return entire json object with return code and message result (default is False) quiet: print the command to the user + stream_type: Sets which output stream from the singularity command should be return. Values are 'stdout', 'stderr', 'both'. """ from spython.utils import check_install @@ -107,7 +109,7 @@ def run( elif not stream: result = self._run_command(cmd, sudo=sudo, return_result=return_result) else: - return stream_command(cmd, sudo=sudo) + return stream_command(cmd, sudo=sudo, output_type=stream_type) # If the user wants the raw result object if return_result: diff --git a/spython/version.py b/spython/version.py index 8b46308..d8199b3 100644 --- a/spython/version.py +++ b/spython/version.py @@ -5,7 +5,7 @@ # with this file, You can obtain one at http://mozilla.org/MPL/2.0/. -__version__ = "0.3.13" +__version__ = "0.3.14" AUTHOR = "Vanessa Sochat" AUTHOR_EMAIL = "vsoch@users.noreply.github.com" NAME = "spython"