如何在 cloud9 runner 中放置多个命令?

How can I put multiple commands in cloud9 runner?

我想创建一个 运行ner 来激活 virtualenv 和其中的 运行 python 代码。 以下配置不起作用:

// Create a custom Cloud9 runner - similar to the Sublime build system
// For more information see https://docs.c9.io/custom_runners.html
{
   "cmd" : ["source /home/p2/bin/activate && python", "$file", "$args"],
   "info" : "Started $project_path$file_name",
   "env" : {},
   "selector" : "*\.py"
}

我找到了解决办法:)

// Create a custom Cloud9 runner - similar to the Sublime build system
// For more information see https://docs.c9.io/custom_runners.html
{
    "cmd" : ["/home/p2/bin/python", "$file", "$args"],
    "info" : "Started $project_path$file_name",
    "env" : {},
    "selector" : "^*\.py$"
}

您也可以通过 bash -c

管道命令