diff --git a/containers/jug/setup_detectors.py b/containers/jug/setup_detectors.py index 34caaf83594b279069582140f524d975cffcc186..5c25a35e70c243df36982f7ba52512f2bcb37334 100755 --- a/containers/jug/setup_detectors.py +++ b/containers/jug/setup_detectors.py @@ -150,12 +150,12 @@ if __name__ == '__main__': file=f) ## run once inside global prefix to initialize artifacts in /opt/detectors os.environ['DETECTOR_PATH'] = args.prefix - cmd = f'cd {args.prefix} && npdet_info print world_z {prefix}/share/athena/athena.xml' + cmd = f'bash -c \'cd {args.prefix} && source {prefix}/setup.sh && npdet_info print world_z {prefix}/share/athena/athena.xml\'' print(cmd) os.system(cmd) ## run once inside specific prefix to initialize artifacts in $DETECTOR_PATH os.environ['DETECTOR_PATH'] = args.prefix - cmd = f'cd {prefix} && npdet_info print world_z {prefix}/share/athena/athena.xml' + cmd = f'bash -c \'cd {prefix} && source {prefix}/setup.sh && npdet_info print world_z {prefix}/share/athena/athena.xml\'' print(cmd) os.system(cmd) print(' --> Symlinking default detector for backward compatibility')