我需要在VS Code终端中执行以下命令。我的应用程序在Windows 10机器上运行。
set DEBUG=app & node app.js
当我运行以上命令时,终端会给我以下错误信息。
At line:1 char:15
+ set DEBUG=app & node app.js
+ ~
The ampersand (&) character is not allowed. The & operator is reserved for
future use; wrap an ampersand in double quotation marks
("&") to pass it as part of a string.
+ CategoryInfo : ParserError: (:) [],
ParentContainsErrorRecordException
+ FullyQualifiedErrorId : AmpersandNotAllowed
然而,当我从命令窗口单独运行相同的命令时,它按预期执行良好。