-
Notifications
You must be signed in to change notification settings - Fork 7
fix(#298): add go install instructions to bundled notion-cli plugin #371
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
javimosch
wants to merge
1
commit into
master
Choose a base branch
from
am/am-f17c27-dkg1g7311cne-ca767030
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+23
−6
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
Repository: javimosch/supercli
Length of output: 506
🏁 Script executed:
Repository: javimosch/supercli
Length of output: 50377
🌐 Web query:
Go environment variables GOPATH default $HOME/go pkg/bin path installation document💡 Result:
The GOPATH environment variable defines the location of your Go workspace. If it is not explicitly set, Go defaults it to $HOME/go on Unix systems and %USERPROFILE%\go on Windows [1][2][3]. The GOPATH directory structure is primarily used for the following purposes: 1. bin directory: This directory contains compiled binary executables [4][5][6]. When you run go install, the resulting binary is placed here by default, unless the GOBIN environment variable is set (in which case GOBIN takes precedence) [3][7]. 2. pkg directory: This directory holds cached data and dependencies. Specifically: - Module cache: When using Go modules, downloaded dependencies are stored in $GOPATH/pkg/mod [1][3][5]. - Build cache: Historically, compiled package objects were stored in subdirectories of pkg/ (e.g., pkg/GOOS_GOARCH/), though modern Go module-aware builds handle caching differently [4][5][7]. - Sum database: Go stores checksum database state in $GOPATH/pkg/sumdb [1]. You can view your current Go environment settings, including the effective GOPATH, by running the command: go env If you wish to change the default GOPATH location, you can set it permanently using: go env -w GOPATH=/your/custom/path Note that GOPATH should not be set to the same directory as your Go installation (GOROOT) [2][8]. Although modern Go development primarily relies on Go modules rather than the traditional GOPATH workspace mode for resolving source imports, the GOPATH variable remains essential for determining these default binary and cache installation paths [1][5][6].
Citations:
🌐 Web query:
Go language specification command search PATH no GOPATH/bin unless GOBIN set💡 Result:
The Go command does not search the PATH to determine where to install binaries; rather, it uses a specific directory priority to determine the installation location [1][2]. When you run 'go install', the destination directory for the resulting executable is determined by the following precedence rules [2][3]: 1. GOBIN: If the GOBIN environment variable is set, the 'go' command installs executables to that directory [1][2]. 2. GOPATH: If GOBIN is not set and GOPATH is set, the command installs executables to the 'bin' subdirectory of the first entry in the GOPATH list [2][4]. 3. Default: If neither GOBIN nor GOPATH is set, the command defaults to the 'bin' subdirectory of the default GOPATH, which is '$HOME/go/bin' (or '%USERPROFILE%\go\bin' on Windows) [1][2]. Note that these rules apply to the installation of binaries by the 'go' command, not to the system's PATH search mechanism for locating executable commands to run [2][5]. After installing a binary, it is standard practice to add the installation directory (e.g., '$GOPATH/bin') to your system PATH so that the installed tools can be executed easily [2][6].
Citations:
🌐 Web query:
node.js child_process exec PATH inherited environment process.env.PATH💡 Result:
In Node.js, the child_process.exec function uses the environment variables specified in the options.env object to execute the command [1][2]. By default, the environment is inherited from the parent process (process.env) [1][3]. If you provide an options.env object, it replaces the entire environment for the child process [1][2]. This means that if you define a custom env object but do not include the original PATH variable, the child process will not have access to the parent's PATH [1][2]. Key behaviors regarding PATH and environment inheritance include: 1. Inheritance: If no env option is provided, the child process automatically inherits the complete process.env from the parent [1][3]. 2. Overriding: If you pass an env object, you must explicitly include all environment variables you wish to preserve, including PATH [4]. A common practice is to spread the existing environment: { env: {...process.env, MY_VAR: 'value' } } [4]. 3. PATH Lookup: The command lookup for the child process uses the PATH variable present in the provided options.env object [1][2]. If options.env is provided but does not contain PATH, the system defaults to a limited search path (/usr/bin:/bin on Unix) or the current process's environment PATH (on Windows) [1][2]. 4. Windows Caveat: On Windows, environment variables are case-insensitive. Node.js sorts keys lexicographically and uses the first match, which can cause issues if your env object contains both PATH and Path [5][3]. For complex environments, it is recommended to explicitly construct the environment object rather than relying on implicit inheritance when modifying specific variables [4].
Citations:
🏁 Script executed:
Repository: javimosch/supercli
Length of output: 18075
Make the Go-installed
notionbinary discoverable.Go installs
notion-clito${GOBIN:-$GOPATH/bin}, and the OS only finds it when that directory is inPATH. The symlink is placed in the same target directory, so add the appropriate Go binary directory toPATHand persist it before thenotion --versioncheck/helps.Update these locations:
plugins/notion-cli/install-guidance.jsonplugins/notion-cli/plugin.jsonplugins/notion-cli/skills/quickstart/SKILL.md📍 Affects 3 files
plugins/notion-cli/install-guidance.json#L7-L8(this comment)plugins/notion-cli/plugin.json#L14-L16plugins/notion-cli/plugin.json#L34-L34plugins/notion-cli/plugin.json#L234-L234plugins/notion-cli/skills/quickstart/SKILL.md#L61-L66🤖 Prompt for AI Agents