Skip to content

Commit 1728ff4

Browse files
authored
Fix: use NSWorkspace's urlForApplication() instead hardcoded url (#22)
2 parents 3ef11a5 + 183ea7f commit 1728ff4

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Sources/CodeEditCLI/Version.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
//
77

88
import ArgumentParser
9-
import Foundation
9+
import AppKit
1010

1111
extension CodeEditCLI {
1212
struct Version: ParsableCommand {
@@ -20,7 +20,7 @@ extension CodeEditCLI {
2020
print("CodeEditCLI: \t\(CLI_VERSION)")
2121

2222
// File URL of CodeEdit.app
23-
let appURL = URL(fileURLWithPath: "/Applications/CodeEdit.app")
23+
let appURL = NSWorkspace.shared.urlForApplication(withBundleIdentifier: "austincondiff.CodeEdit")
2424

2525
// Check if there is an Info.plist inside CodeEdit.app
2626
// Then get the version number and print it out

Sources/CodeEditCLI/main.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import Foundation
1111
// ##################################################
1212
// This needs to be changed prior to every release!
1313
// ##################################################
14-
let CLI_VERSION = "0.0.7"
14+
let CLI_VERSION = "0.0.8"
1515

1616
struct CodeEditCLI: ParsableCommand {
1717
static let configuration = CommandConfiguration(

0 commit comments

Comments
 (0)