相关疑难解决方法(0)

Azure Devops Powershell 不显示 Get-ChildItem 的文件名

我在 Azure DevOps 管道中使用以下任务vmImage: ubuntu-latest

- pwsh: Get-ChildItem *.* -Recurse -Path $(Pipeline.Workspace)
  displayName: 'Show folder contents for debugging'
Run Code Online (Sandbox Code Playgroud)

我这样做是为了列出在先前的管道工件步骤dir中下载的文件列表。download我也尝试过常规powershell而不是 Powershell Core。

文件夹名称显示正确,并且似乎显示了文件条目,但根本不包含文件名。这是我看到的输出的一部分:

/usr/bin/pwsh -NoLogo -NoProfile -NonInteractive -Command . '/home/vsts/work/_temp/1f22f03a-d1c6-4983-a08e-39ed349876be.ps1'

    Directory: /home/vsts/work/1

UnixMode   User             Group                 LastWriteTime           Size
--------   ----             -----                 -------------           ----
drwxr-xr-x vsts             docker             04/03/2022 16:22           4096
drwxr-xr-x vsts             docker             04/03/2022 16:22           4096
drwxr-xr-x vsts             docker             04/03/2022 16:22           4096
drwxr-xr-x vsts             docker             04/03/2022 16:22           4096
drwxr-xr-x …
Run Code Online (Sandbox Code Playgroud)

powershell azure azure-devops powershell-core

11
推荐指数
1
解决办法
1814
查看次数

标签 统计

azure ×1

azure-devops ×1

powershell ×1

powershell-core ×1