@mac-bug-screenshot/native-host 1.0.8 → 1.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/host.js +3 -0
  2. package/package.json +1 -1
package/host.js CHANGED
@@ -35,6 +35,9 @@ async function capture(outputDir) {
35
35
 
36
36
  await fs.promises.mkdir(resolvedDir, { recursive: true });
37
37
  await runCommand("screencapture", ["-i", "-s", "-t", "png", outputPath]);
38
+ if (!fs.existsSync(outputPath)) {
39
+ throw new Error("캡처가 취소되었습니다.");
40
+ }
38
41
  await runCommand("open", ["-a", "Preview", outputPath]);
39
42
 
40
43
  return outputPath;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mac-bug-screenshot/native-host",
3
- "version": "1.0.8",
3
+ "version": "1.0.9",
4
4
  "description": "Native messaging host for Mac Bug Screenshot.",
5
5
  "bin": {
6
6
  "mac-bug-screenshot-install": "bin/install.js"