Skip to content

Commit

Permalink
Fix: use NSWorkspace's urlForApplication() instead hardcoded url (#22)
Browse files Browse the repository at this point in the history
  • Loading branch information
lukepistrol committed Jan 2, 2023
2 parents 3ef11a5 + 183ea7f commit 1728ff4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Sources/CodeEditCLI/Version.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
//

import ArgumentParser
import Foundation
import AppKit

extension CodeEditCLI {
struct Version: ParsableCommand {
Expand All @@ -20,7 +20,7 @@ extension CodeEditCLI {
print("CodeEditCLI: \t\(CLI_VERSION)")

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

// Check if there is an Info.plist inside CodeEdit.app
// Then get the version number and print it out
Expand Down
2 changes: 1 addition & 1 deletion Sources/CodeEditCLI/main.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import Foundation
// ##################################################
// This needs to be changed prior to every release!
// ##################################################
let CLI_VERSION = "0.0.7"
let CLI_VERSION = "0.0.8"

struct CodeEditCLI: ParsableCommand {
static let configuration = CommandConfiguration(
Expand Down

0 comments on commit 1728ff4

Please sign in to comment.