Skip to content

Commit

Permalink
fix: go install
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon-He95 committed Dec 11, 2023
1 parent 55cff15 commit 5f06f10
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,10 @@ export async function setup() {
const loading_status = await loading(
`${isZh ? '正在为您安装' : 'Installing'} ${params} ...\n`,
)
const { status } = await useNodeWorker(`go get ${params}`)
const { status } = params
? await useNodeWorker(`go get ${params}`)
: await useNodeWorker('go mod tidy')

if (status === 0) {
loading_status.succeed(
color.green(isZh ? '安装成功! 😊' : 'Installed successfully! 😊'),
Expand Down

0 comments on commit 5f06f10

Please sign in to comment.