duanchai0028 2018-05-05 16:16
浏览 99

集成终端:更新环境变量

This is my first day using vscode with beego. I used IntelliJ otherwise, which has a setting to specify custom paths for GOPATH.

Vscode does not seem to have this option of allowing multiple GOPATHs, and I thought I could try to append GOPATH variable for all integrated terminal sessions.

I've added following to settings.json

"terminal.integrated.env.osx": {
    "GOPATH": "/Users/hk/go:/Users/hk/Documents/code/go/go-beego"
}

However, it has no effect on tasks.json

{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
    {
        "label": "go: run beego",
        "type": "shell",
        "command": "echo \"gopath is $GOPATH\" | bee run portal"
    }
]
}

Output of tasks

gopath is /Users/hk/go
FATAL    ▶ 0001 No application 'portal'
found in your GOPATH. 
The terminal process terminated with exit code: 255

EDIT: The integrated terminal does not honour the following: "go.gopath": "/Users/hk/go:/Users/hk/Documents/code/go/go-beego",

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥100 支付宝网页转账系统不识别账号
    • ¥15 基于单片机的靶位控制系统
    • ¥15 AT89C51控制8位八段数码管显示时钟。
    • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
    • ¥15 下图接收小电路,谁知道原理
    • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
    • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
    • ¥15 手机接入宽带网线,如何释放宽带全部速度
    • ¥30 关于#r语言#的问题:如何对R语言中mfgarch包中构建的garch-midas模型进行样本内长期波动率预测和样本外长期波动率预测
    • ¥15 ETLCloud 处理json多层级问题