Skip to content

Commit

Permalink
Synced salt.utils.path with the most recent commit from my PR saltsta…
Browse files Browse the repository at this point in the history
  • Loading branch information
arizvisa committed Feb 25, 2019
1 parent 6c3357c commit 185dfa2
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions build/master.project/salt/_utils/path.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,13 +263,20 @@ def has_executable_ext(path, ext_membership):
is_executable = lambda path, membership=res: is_executable_common(path) and has_executable_ext(path, membership)

else:
# In posix, there's no such thing as file extensions..only zuul
# in posix, there's no such thing as file extensions..only zuul
pathext = ['']

# executable semantics are pretty simple on reasonable platforms...
is_executable = is_executable_common

## Now to search through our system_path for something that is executable
## search for the executable

# check to see if the full path was specified as then we don't need
# to actually walk the system_path for any reason
if is_executable(exe):
return exe

# now to search through our system_path
for path in system_path:
p = join(path, exe)

Expand All @@ -282,7 +289,7 @@ def has_executable_ext(path, ext_membership):
continue
continue

## If something was executable, we should've found it already...
## if something was executable, we should've found it already...
log.trace(
'\'%s\' could not be found in the following search path: \'%s\'',
exe, system_path
Expand Down

0 comments on commit 185dfa2

Please sign in to comment.