Skip to content

Commit 4e77340

Browse files
committed
adding symbolic link check
1 parent 37bc847 commit 4e77340

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

singularity/build/main.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,11 @@ def run_build(build_dir,params,verbose=True, compress_image=False):
121121
if os.path.exists(params['spec_file']):
122122
bot.info("Found spec file %s in repository" %params['spec_file'])
123123

124+
# If the user has a symbolic link
125+
if os.path.islink(params['spec_file']):
126+
bot.info("%s is a symbolic link." %params['spec_file'])
127+
params['spec_file'] = os.path.realpath(params['spec_file'])
128+
124129
# START TIMING
125130
start_time = datetime.now()
126131
image = build_from_spec(spec_file=params['spec_file'], # default will package the image

0 commit comments

Comments
 (0)