Open mattcieslak opened 4 days ago
We currently have the type set to Path. We should probably set it to IsFile (i.e., an existing file):
When a user doesn't provide it at all, we can do what XCP-D used to do (see here):
if opts.fs_license_file is not None:
opts.fs_license_file = opts.fs_license_file.resolve()
if opts.fs_license_file.is_file():
os.environ["FS_LICENSE"] = str(opts.fs_license_file)
else:
error_messages.append(f"Freesurfer license DNE: {opts.fs_license_file}.")
else:
fs_license_file = os.environ.get("FS_LICENSE", "/opt/freesurfer/license.txt")
if not Path(fs_license_file).is_file():
error_messages.append(
"A valid FreeSurfer license file is required. "
"Set the FS_LICENSE environment variable or use the '--fs-license-file' flag."
)
os.environ["FS_LICENSE"] = str(fs_license_file)
I forgot to add
--fs-license-file
to a recent run of QSIRecon and ran into: