mirror of https://github.com/ansible/ansible.git
Allow OSError to skip scriptdir removal
On Ubuntu the scriptdir gets placed into sys.path. This makes some modules (copy) fail because the ansible module gets loaded instead of the stdlib copy module. So we remove scriptdir there. Unfortunately, the scriptdir code uses abspath(). When pipelining, abspath() has to find the cwd. On OSX, finding the cwd when that directory is not executable by the user raises an OSError. Since OSX does not suffer from the scriptdir problem we're able to just skip scriptdir handling if we get that exception. Fixes #19729pull/20065/head
parent
99e19ad617
commit
03510ec4ce
Loading…
Reference in New Issue