Skip to content

Bug: Failed to run on Windows due to hardcoded '/bin/sh' in PowerShell wrapper #61

Description

@laoqiu

当在原生 Windows 环境(PowerShell/CMD)下通过 npm 安装并运行 notion-cli 时,程序会报错崩溃。生成的 notion.ps1 脚本错误地尝试去调用 /bin/sh.exe,而标准 Windows 系统中根本没有这个路径。

PS E:\project\open-agent> npm install -g @4ier/notion-cli

added 1 package in 43s
PS E:\project\open-agent> notion -v
&: C:\Users\Administrator\AppData\Roaming\npm\notion.ps1:24
Line |
  24 |      & "/bin/sh$exe"  "$basedir/node_modules/@4ier/notion-cli/bin/noti …
     |        ~~~~~~~~~~~~~
     | The term '/bin/sh.exe' is not recognized as a name of a cmdlet, function, script file, or executable program. Check the spelling of the name, or if a path was included,
     | verify that the path is correct and try again.

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

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions