Skip to content

Preventing environment variable expansion in windows displays unexpected output #131

Description

@gshively11

I tried to track down the root cause of this but was unable to in the time I had available.

In cmd.exe, running this echo %^COMPUTERNAME% outputs %COMPUTERNAME%

In mixlib/shellout, running

blah = Mixlib::ShellOut.new("echo %^COMPUTERNAME%")
blah.run_command.stdout

outputs %^COMPUTERNAME%. I would expect the carat to be removed like it is in cmd.exe.

The end result of this behavior is that I can't run commands that expected unexpanded environment variables as arguments.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions