Skip to content

Commit

Permalink
Merge pull request #824 from tomhampshire/main-exit-code
Browse files Browse the repository at this point in the history
Console script return status code
  • Loading branch information
neurolabusc authored Jul 24, 2024
2 parents f9ad69e + 70007b6 commit 299aac0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
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

0 comments on commit 299aac0

Please sign in to comment.