简体   繁体   English

以Scheduled Task Powershell脚本运行时Chromium源下载错误

[英]Chromium source download errors when running as Scheduled Task Powershell script

I'm trying to script the download and build steps for the Chromium Source and related v8 code using the steps from Chromium Docs . 我正在尝试使用Chromium Docs中的步骤编写Chromium Source和相关v8代码的下载和构建步骤的脚本。

Powershell Run Command: Powershell运行命令:

.\\dl-chromium-src.ps1 -c stable -d E:\\chromium-downloads -r E:\\scripts 。\\ dl-chromium-src.ps1 -c稳定-d E:\\ chromium-downloads -r E:\\ scripts

CMD Run Command: CMD运行命令:

powershell -NoProfile -ExecutionPolicy Bypass -File E:\\scripts\\dl-chromium-src.ps1 -c stable -d E:\\chromium-downloads -r E:\\scripts powershell -NoProfile -ExecutionPolicy绕过-文件E:\\ scripts \\ dl-chromium-src.ps1 -c稳定-d E:\\ chromium-downloads -r E:\\ scripts

When the script is run I keep getting an error during fetch call ( Line 91 ). 当脚本运行时,在fetch调用期间( 第91行 ),我总是收到错误消息。 I think this has to do with the make steps, but I'm not sure. 我认为这与制作步骤有关,但我不确定。

Error message: 错误信息:

IOError: [Errno 2] No such file or directory: 'toolchain\\win_x86\\x86_64-nacl\\include\\c++\\4.4.3\\ext\\pb_ds\\detail\\binomial_heap_\\constructors_destructor_fn_imps.hpp'

I don't get this error when running fetch --no-history chromium from a powershell window manually. 从powershell窗口手动运行fetch --no-history chromium时,我没有收到此错误。 I only get the error when the script is run from command line (eg through Scheduled Tasks). 仅当从命令行(例如,通过计划任务)运行脚本时,才会出现错误。

I'm assuming it had to do with the profile so I tried running the script without -NoProfile but that didn't help. 我假设它与配置文件有关,所以我尝试在没有-NoProfile的情况下运行脚本,但这没有帮助。 I've also checked the environment variables from a Powershell command line and from within a Powershell script and they're the same. 我还从Powershell命令行和Powershell脚本中检查了环境变量,它们是相同的。 I've included the code and a more detailed stack trace below. 我在下面包括了代码和更详细的堆栈跟踪。

Code

Script Parameters 脚本参数

+--------------------+-------+-------------------+
|     Parameter      | Alias |    Valid Input    |
+--------------------+-------+-------------------+
| channel            | -c    | "beta" | "stable" |
| downloadsDirectory | -d    | <String>          |
| runningDirectory   | -r    | <String>          |
+--------------------+-------+-------------------+

The issue had to do with Windows long path name limitations. 该问题与Windows长路径名限制有关。 I updated the path length maximums for the OS and git, but these stack trace from above was from the python scripts. 我更新了OS和git的最大路径长度,但是从上面的这些堆栈跟踪来自python脚本。 I couldn't figure out how to fix it for python so I ended up shortening my path names and then the script worked. 我不知道如何为python修复它,所以我最终缩短了路径名,然后脚本起作用了。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM