File tree Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -69,8 +69,9 @@ def construct_prep_cmd(args):
69
69
# clone git repo
70
70
cmd = construct_git_cmd (args .kfp_git_url )
71
71
elif args .kfp_dir :
72
- # symlink a directory
73
- cmd = f'ln -s "{ args .kfp_dir } " "${{td}}/kfp"\n '
72
+ # symlink an absolute path to the directory
73
+ kfp_abs = os .path .realpath (args .kfp_dir )
74
+ cmd = f'ln -s "{ kfp_abs } " "${{td}}/kfp"\n '
74
75
elif os .path .isfile (DEFAULT_KFP_JSON ):
75
76
# create symlinks to the known-false-positives RPM package installed on the system
76
77
cmd = f'ln -s "{ DEFAULT_KFP_DIR } " "${{td}}/kfp"\n ' \
@@ -204,12 +205,8 @@ def main():
204
205
args = parser .parse_args ()
205
206
206
207
# if --kfp-dir is used, check that a directory was given
207
- if args .kfp_dir :
208
- if not os .path .isdir (args .kfp_dir ):
209
- parser .error (f"'{ args .kfp_dir } ' given to --kfp-dir is not a directory" )
210
-
211
- # get rid of relative paths
212
- args .kfp_dir = os .path .realpath (args .kfp_dir )
208
+ if args .kfp_dir and not os .path .isdir (args .kfp_dir ):
209
+ parser .error (f"'{ args .kfp_dir } ' given to --kfp-dir is not a directory" )
213
210
214
211
# construct the command to filter
215
212
try :
You can’t perform that action at this time.
0 commit comments