Skip to content

Commit b1d11f7

Browse files
authored
add noprofile/noninteractive to all powershell commands (#2959)
1 parent 350242d commit b1d11f7

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

Taskfile.yml

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ vars:
88
BIN_DIR: "bin"
99
VERSION:
1010
sh: node version.cjs
11-
RMRF: '{{if eq OS "windows"}}powershell Remove-Item -Force -Recurse -ErrorAction SilentlyContinue{{else}}rm -rf{{end}}'
12-
DATE: '{{if eq OS "windows"}}powershell Get-Date -UFormat{{else}}date{{end}}'
11+
RMRF: '{{if eq OS "windows"}}powershell -NoProfile -NonInteractive Remove-Item -Force -Recurse -ErrorAction SilentlyContinue{{else}}rm -rf{{end}}'
12+
DATE: '{{if eq OS "windows"}}powershell -NoProfile -NonInteractive Get-Date -UFormat{{else}}date{{end}}'
1313
ARTIFACTS_BUCKET: waveterm-github-artifacts/staging-w2
1414
RELEASES_BUCKET: dl.waveterm.dev/releases-w2
1515
WINGET_PACKAGE: CommandLine.Wave
@@ -239,7 +239,7 @@ tasks:
239239
desc: Build the wavesrv component for Windows platforms (only generates artifacts for the current architecture).
240240
platforms: [windows]
241241
cmds:
242-
- cmd: powershell -Command "Remove-Item -Force -ErrorAction SilentlyContinue -Path dist/bin/wavesrv*"
242+
- cmd: powershell -NoProfile -NonInteractive -Command "Remove-Item -Force -ErrorAction SilentlyContinue -Path dist/bin/wavesrv*"
243243
ignore_error: true
244244
- task: build:server:internal
245245
vars:
@@ -279,7 +279,7 @@ tasks:
279279
- cmd: rm -f dist/bin/wsh*
280280
platforms: [darwin, linux]
281281
ignore_error: true
282-
- cmd: powershell -Command "Remove-Item -Force -ErrorAction SilentlyContinue -Path dist/bin/wsh*"
282+
- cmd: powershell -NoProfile -NonInteractive -Command "Remove-Item -Force -ErrorAction SilentlyContinue -Path dist/bin/wsh*"
283283
platforms: [windows]
284284
ignore_error: true
285285
- task: build:wsh:internal
@@ -343,7 +343,7 @@ tasks:
343343
- cmd: "{{.RMRF}} dist/tsunamiscaffold"
344344
ignore_error: true
345345
- task: copyfiles:'tsunami/frontend/scaffold':'dist/tsunamiscaffold'
346-
- cmd: '{{if eq OS "windows"}}powershell Copy-Item -Path tsunami/templates/empty-gomod.tmpl -Destination dist/tsunamiscaffold/go.mod{{else}}cp tsunami/templates/empty-gomod.tmpl dist/tsunamiscaffold/go.mod{{end}}'
346+
- cmd: '{{if eq OS "windows"}}powershell -NoProfile -NonInteractive Copy-Item -Path tsunami/templates/empty-gomod.tmpl -Destination dist/tsunamiscaffold/go.mod{{else}}cp tsunami/templates/empty-gomod.tmpl dist/tsunamiscaffold/go.mod{{end}}'
347347
deps:
348348
- tsunami:scaffold
349349
sources:
@@ -502,7 +502,7 @@ tasks:
502502
copyfiles:*:*:
503503
desc: Recursively copy directory and its contents.
504504
internal: true
505-
cmd: '{{if eq OS "windows"}}powershell Copy-Item -Recurse -Force -Path {{index .MATCH 0}} -Destination {{index .MATCH 1}}{{else}}mkdir -p "$(dirname {{index .MATCH 1}})" && cp -r {{index .MATCH 0}} {{index .MATCH 1}}{{end}}'
505+
cmd: '{{if eq OS "windows"}}powershell -NoProfile -NonInteractive Copy-Item -Recurse -Force -Path {{index .MATCH 0}} -Destination {{index .MATCH 1}}{{else}}mkdir -p "$(dirname {{index .MATCH 1}})" && cp -r {{index .MATCH 0}} {{index .MATCH 1}}{{end}}'
506506

507507
clean:
508508
desc: clean make/dist directories
@@ -555,7 +555,7 @@ tasks:
555555
- cmd: rm -f package.json
556556
platforms: [darwin, linux]
557557
ignore_error: true
558-
- cmd: powershell -Command "Remove-Item -Force -ErrorAction SilentlyContinue -Path package.json"
558+
- cmd: powershell -NoProfile -NonInteractive -Command "Remove-Item -Force -ErrorAction SilentlyContinue -Path package.json"
559559
platforms: [windows]
560560
ignore_error: true
561561
- npm --no-workspaces init -y --init-license Apache-2.0
@@ -601,26 +601,26 @@ tasks:
601601
cmds:
602602
- cmd: "{{.RMRF}} scaffold"
603603
ignore_error: true
604-
- powershell New-Item -ItemType Directory -Force -Path scaffold
605-
- powershell Copy-Item -Path ../templates/package.json.tmpl -Destination scaffold/package.json
606-
- powershell -Command "Set-Location scaffold; npm install"
607-
- powershell Move-Item -Path scaffold/node_modules -Destination scaffold/nm
608-
- powershell Copy-Item -Recurse -Force -Path dist -Destination scaffold/
609-
- powershell New-Item -ItemType Directory -Force -Path scaffold/dist/tw
610-
- powershell Copy-Item -Path '../templates/*.go.tmpl' -Destination scaffold/
611-
- powershell Copy-Item -Path ../templates/tailwind.css -Destination scaffold/
612-
- powershell Copy-Item -Path ../templates/gitignore.tmpl -Destination scaffold/.gitignore
613-
- powershell Copy-Item -Path 'src/element/*.tsx' -Destination scaffold/dist/tw/
614-
- powershell Copy-Item -Path '../ui/*.go' -Destination scaffold/dist/tw/
615-
- powershell Copy-Item -Path ../engine/errcomponent.go -Destination scaffold/dist/tw/
604+
- powershell -NoProfile -NonInteractive New-Item -ItemType Directory -Force -Path scaffold
605+
- powershell -NoProfile -NonInteractive Copy-Item -Path ../templates/package.json.tmpl -Destination scaffold/package.json
606+
- powershell -NoProfile -NonInteractive -Command "Set-Location scaffold; npm install"
607+
- powershell -NoProfile -NonInteractive Move-Item -Path scaffold/node_modules -Destination scaffold/nm
608+
- powershell -NoProfile -NonInteractive Copy-Item -Recurse -Force -Path dist -Destination scaffold/
609+
- powershell -NoProfile -NonInteractive New-Item -ItemType Directory -Force -Path scaffold/dist/tw
610+
- powershell -NoProfile -NonInteractive Copy-Item -Path '../templates/*.go.tmpl' -Destination scaffold/
611+
- powershell -NoProfile -NonInteractive Copy-Item -Path ../templates/tailwind.css -Destination scaffold/
612+
- powershell -NoProfile -NonInteractive Copy-Item -Path ../templates/gitignore.tmpl -Destination scaffold/.gitignore
613+
- powershell -NoProfile -NonInteractive Copy-Item -Path 'src/element/*.tsx' -Destination scaffold/dist/tw/
614+
- powershell -NoProfile -NonInteractive Copy-Item -Path '../ui/*.go' -Destination scaffold/dist/tw/
615+
- powershell -NoProfile -NonInteractive Copy-Item -Path ../engine/errcomponent.go -Destination scaffold/dist/tw/
616616

617617
tsunami:build:
618618
desc: Build the tsunami binary.
619619
cmds:
620620
- cmd: rm -f bin/tsunami*
621621
platforms: [darwin, linux]
622622
ignore_error: true
623-
- cmd: powershell -Command "Remove-Item -Force -ErrorAction SilentlyContinue -Path bin/tsunami*"
623+
- cmd: powershell -NoProfile -NonInteractive -Command "Remove-Item -Force -ErrorAction SilentlyContinue -Path bin/tsunami*"
624624
platforms: [windows]
625625
ignore_error: true
626626
- mkdir -p bin

0 commit comments

Comments
 (0)