lib/wrapp/app_info.rb in wrapp-0.4.0 vs lib/wrapp/app_info.rb in wrapp-0.5.0
- old
+ new
@@ -18,11 +18,11 @@
def version
get_property('CFBundleShortVersionString')
end
def get_property(property)
- command_line = Cocaine::CommandLine.new('/usr/libexec/PlistBuddy',
- '-c :cmd :plist')
- command_line.run(:cmd => "Print #{property}", :plist => plist).strip
+ output = `/usr/libexec/PlistBuddy -c 'Print :#{property}' '#{plist}'`
+ raise "Error reading #{property} from #{plist}" unless $?.success?
+ output.strip
end
end
end