File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -333,8 +333,17 @@ def set_env(language=None):
333333 os .mkdir (common .thumb_dir )
334334
335335 # command file
336- common .cmd_file = os .path .join (os .getenv ("HOME" ), ".azotebg" )
337-
336+
337+ if os .path .isfile (os .path .join (os .getenv ("HOME" ), ".azotebg" )):
338+ common .cmd_file = os .path .join (os .getenv ("HOME" ), ".azotebg" )
339+ log ("~/.azotebg file found" , common .INFO )
340+ elif os .path .join (os .getenv ("HOME" ), ".local/bin" ) in os .getenv ("PATH" ):
341+ common .cmd_file = os .path .join (os .getenv ("HOME" ), ".local/bin/azotebg" )
342+ elif os .path .join (os .getenv ("HOME" ), "bin" ) in os .getenv ("PATH" ):
343+ common .cmd_file = os .path .join (os .getenv ("HOME" ), "bin/azotebg" )
344+ else :
345+ common .cmd_file = os .path .join (os .getenv ("HOME" ), ".azotebg" )
346+ log ("No valid $PATH location found, using the fallback location" , common .INFO )
338347 # temporary folder
339348 common .tmp_dir = os .path .join (common .data_home , "temp" )
340349 if not os .path .isdir (common .tmp_dir ):
You can’t perform that action at this time.
0 commit comments