Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Console script return status code #824

Merged
merged 2 commits into from
Jul 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,6 @@ Please try the following steps to resolve your issue:
```
git clone --branch development https://github.com/rordenlab/dcm2niix.git
cd dcm2niix/console
g++ -I. main_console.cpp nii_foreign.cpp nii_dicom.cpp jpg_0XC3.cpp ujpeg.cpp nifti1_io_core.cpp nii_ortho.cpp nii_dicom_batch.cpp -o dcm2niix -DmyDisableOpenJPEG
make
./dcm2niix ....
```
4 changes: 2 additions & 2 deletions dcm2niix/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ def main(args=None, **run_kwargs):
Arguments:
args: defaults to `sys.argv[1:]`.
**run_kwargs: passed to `subprocess.run`.
Returns: `subprocess.CompletedProcess` instance.
Returns: `int` exit code from dcm2niix execution.
"""
if args is None:
import sys
args = sys.argv[1:]
from subprocess import run
return run([bin] + args, **run_kwargs)
return run([bin] + args, **run_kwargs).returncode
Loading