Skip to content

host.py execute_script does not work as expected on macOS #325

Open
@rushikeshjadhav

Description

@rushikeshjadhav

Fail log -

E           lib.commands.SSHCommandFailed: SSH command (scp -o "StrictHostKeyChecking no" -o "LogLevel ERROR" -o "UserKnownHostsFile /dev/null" /var/folders/m1/pkrv8btj0cv6v020q7v3y6c40000gn/T/tmpxly5xl2e [email protected]:/var/folders/m1/pkrv8btj0cv6v020q7v3y6c40000gn/T/tmpxly5xl2e) failed with return code 1: scp: dest open "/var/folders/m1/pkrv8btj0cv6v020q7v3y6c40000gn/T/tmpxly5xl2e": No such file or directory
E           scp: failed to upload file /var/folders/m1/pkrv8btj0cv6v020q7v3y6c40000gn/T/tmpxly5xl2e to /var/folders/m1/pkrv8btj0cv6v020q7v3y6c40000gn/T/tmpxly5xl2e

lib/commands.py:214: SSHCommandFailed

def execute_script(self, script_contents, shebang='sh', simple_output=True):

execute_script expects the path (script.name) to be available on both places, usually /tmp/xxxx however in macOS its handled differently thus the script fails.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions