Skip to content
This repository was archived by the owner on Oct 22, 2020. It is now read-only.

Commit 99d56a4

Browse files
committed
Fix version and update checking when using symlinks
1 parent 82b4307 commit 99d56a4

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

wpxf.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,10 @@
77

88
begin
99
Slop.parse do |o|
10+
version_file_path = File.join(Wpxf.app_path, 'VERSION')
11+
1012
o.on '--update', 'check for updates' do
11-
current_version = File.read('VERSION').strip
13+
current_version = File.read(version_file_path).strip
1214

1315
updater = Wpxf::GitHubUpdater.new
1416
update = updater.get_update(current_version)
@@ -32,7 +34,7 @@
3234
end
3335

3436
o.on '--version', 'print the version' do
35-
puts File.read('VERSION').strip
37+
puts File.read(version_file_path).strip
3638
exit
3739
end
3840
end

0 commit comments

Comments
 (0)