diff --git a/library/commands/command b/library/commands/command index e996c0c4a7..ad6ed6c171 100644 --- a/library/commands/command +++ b/library/commands/command @@ -95,7 +95,7 @@ def main(): module.fail_json(rc=256, msg="no command given") if chdir: - os.chdir(os.path.expanduser(chdir)) + os.chdir(chdir) if creates: # do not run the command if the line contains creates=filename