【发布时间】:2016-02-13 23:39:30
【问题描述】:
我在 Windows 中使用 makefile 将一些文件推送到 Unix 服务器上(这里是我的 makefile 的同一文件夹中的文本文件“blob.txt”)。 我的 makefile 脚本是:
setup:
pscp blob.txt username@hostname:/folder/
我启动命令提示符,进入 blob.txt 和 makefile 所在的文件夹并输入:
make setup
结果:
pscp blob.txt username@hostname:/folder/
process_begin: CreateProcess(NULL, pscp blob.txt username@hostname:/folder/, ...) failed.
make (e=2): The system cannot find the file specified.
make: *** [setup] Error 2
在 #fail ... 而如果我在命令提示符中直接输入命令:
pscp blob.txt username@hostname:/folder/
它有效......我真的很想知道为什么。
【问题讨论】:
-
从
make运行和手动运行时检查PATH(或等效项)的值。我打赌它们在包含pscp的路径方面有所不同。 -
这完全正确,解决了问题!如果需要,您可以将其发布为答案!
-
这也刚刚开始发生在我身上。 make 进程不能再“看到”我系统上的某些文件。我已经用 Chocolatey 安装了 GNU make,它多年来一直运行良好。今天突然之间,bash.exe 和 wsl.exe 等文件在 make 过程中被隐藏了。
标签: windows bash makefile putty pscp