Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Different behavior on Linux vs. Windows for passing "*" to az cli #24170

Copy link
Copy link
@onionhammer

Description

@onionhammer
Issue body actions

Prerequisites

Steps to reproduce

  1. Create a powershell script which passes variable to the "--pattern" argument to az storage blob upload-batch
  2. Set pattern variable to "" or "`"
  3. Run script on Windows: Voila it works
  4. Run script on Linux: It finds no files
  5. Hard-code the "*" into the "--pattern" argument on Linux, it works

There does not appear to be a way to pass "*" as variable to az storage blob upload-batch on linux, only hardcode it as a parameter; this behavior works as-expected on Windows.

Expected behavior

$Path = "`*"
      az storage blob upload-batch `
        --auth-mode login `
        --pattern $Path `
        -s "." `
        -d $dest

# Should upload all files in a directory and return a list of files; i.e. ['file1.txt']

Actual behavior

$Path = "`*"
      az storage blob upload-batch `
        --auth-mode login `
        --pattern $Path `
        -s "." `
        -d $dest

# Actually returns [] or no output on Linux, but on Windows works consistently

      az storage blob upload-batch `
        --auth-mode login `
        --pattern '*' `
        -s "." `
        -d $dest

# Works fine

Error details

No errors

Environment data

pwsh --version
PowerShell 7.4.4

Visuals

No response

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.