小编RRe*_*Ret的帖子

Windows 上的 github 运行程序在 PowerShell 上找不到可执行文件

我正在尝试使用自托管的 Windows-VM 来运行 west 进行存储库管理,使用 python 来运行一些脚本,并使用 git 来推送回存储库。

这项工作是使用 python 生成文件repo-A作为工件来签入repo-B。我必须使用 Windows,因为文件生成工具只能在 Windows 上运行。

我有一个自托管构建代理设置,并且能够在其上运行 github 操作。

在VM端,这些是相关命令的路径(表明它们已正确添加到$PATH)

PS C:\TouchGFXProjects\wallSwitch-gui-hesPrototype-480-272> gcm west; gcm tgfx.exe; gcm python; gcm git

CommandType     Name                                               Version    Source
-----------     ----                                               -------    ------
Application     west.exe                                           0.0.0.0    C:\Users\tgfx\AppData\Local\Programs\Python\Python39\Scripts\west.exe
Application     tgfx.exe                                           4.16.1.0   C:\TouchGFX\4.16.1\designer\tgfx.exe
Application     python.exe                                         3.9.515... C:\Users\tgfx\AppData\Local\Programs\Python\Python39\python.exe
Application     git.exe                                            2.31.1.1   C:\Program Files\Git\cmd\git.exe
Run Code Online (Sandbox Code Playgroud)

VM 的执行策略设置为:

PS C:\Windows\system32> Get-ExecutionPolicy -List
        Scope ExecutionPolicy
        ----- ---------------
MachinePolicy       Undefined
   UserPolicy       Undefined
      Process       Undefined
  CurrentUser       Undefined
 LocalMachine          Bypass
Run Code Online (Sandbox Code Playgroud)

当从虚拟机本身的 powerShell …

github-for-windows github-actions-runners github-actions-self-hosted-runners

5
推荐指数
1
解决办法
2546
查看次数