Skip to content

pixi shell broken on Windows if Env vars contains quotes #1505

Closed

Description

@melund

Checks

  • I have checked that this issue has not already been reported.

  • I have confirmed this bug exists on the latest version of pixi, using pixi --version.

Reproducible example

On windows poweshell create an environment variable with quotes then activate the shell

❯ $env:MYVAR = '"hello"'
❯ pixi shell
ParserError: D:\TEMP\.tmpDLRbMf.ps1:56
Line |
  56 |  ${Env:MYVAR} = ""hello""
     |                   ~~~~~~~
     | Unexpected token 'hello""' in expression or statement.

Issue description

Quotes are not correctly escaped when creating the tempoarary script used by pixi shell in windows powershell.

Expected behavior

The command would succeed.

Activity

  1. added
    bug
    on Jun 13, 2024
  2. ruben-arts commented on Jun 14, 2024

    @ruben-arts
    Contributor

    Same issue as #1503

    We shouldn't copy the environment variables as the shell will do that itself. #1507 fixes the issue.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions