Skip to content

Commit deec252

Browse files
🐛 Fix: win10 cmd crash bug when "picgo upload" (#35)
* fix crash bug when windows 'picgo upload' * 🐛 fix win10 cmd crash bug when "picgo upload"
1 parent 49d9c85 commit deec252

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/utils/clipboard/windows10.ps1

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ function main {
2727
$stream.Dispose() | out-null
2828

2929
$imagePath
30+
# fix windows 10 native cmd crash bug when "picgo upload"
31+
# https://github.com/PicGo/PicGo-Core/issues/32
32+
Exit 1
3033
}
3134

3235
try {

src/utils/getClipboardImage.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,10 @@ const getClipboardImage = (ctx: PicGo): Promise<ClipboardImage> => {
4646
'-nologo',
4747
'-sta',
4848
'-executionpolicy', 'unrestricted',
49-
'-windowstyle', 'hidden',
49+
// fix windows 10 native cmd crash bug when "picgo upload"
50+
// https://github.com/PicGo/PicGo-Core/issues/32
51+
// '-windowstyle', 'hidden',
52+
// '-noexit',
5053
'-file', scriptPath,
5154
imagePath
5255
])

0 commit comments

Comments
 (0)