Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
base
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
FSL
base
Commits
411e255a
Commit
411e255a
authored
3 years ago
by
Paul McCarthy
Browse files
Options
Downloads
Patches
Plain Diff
RF: Handle FSLDIR=child env
parent
96a4bacb
No related branches found
No related tags found
1 merge request
!46
Mnt/update fsl package
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
share/fsl/sbin/update_fsl_package
+15
-0
15 additions, 0 deletions
share/fsl/sbin/update_fsl_package
with
15 additions
and
0 deletions
share/fsl/sbin/update_fsl_package
+
15
−
0
View file @
411e255a
...
...
@@ -88,9 +88,24 @@ def conda(cmd : str, capture_output=True, **kwargs) -> str:
Keyword arguments are passed through to subprocess.run.
"""
fsldir = os.environ['FSLDIR']
condabin = op.join(fsldir, 'bin', 'conda')
# If FSLDIR is a child env, we won't be able
# to find the conda executable. In this case,
# we have to assume that we can call "conda".
candidates = [
op.join(fsldir, 'bin', 'conda'),
op.join(fsldir, 'condabin', 'conda'),
]
for condabin in candidates:
if op.exists(condabin):
break
else:
condabin = 'conda'
log.debug(f'Running {condabin} {cmd}')
kwargs['check'] = False
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment