Skip to content

Commit

Permalink
Try with $?.success
Browse files Browse the repository at this point in the history
  • Loading branch information
mrousavy committed Jul 24, 2024
1 parent ecb7443 commit 540755f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions package/VisionCamera.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ else
end

def Pod::getWorkletsLibraryPath
output = `cd "#{Pod::Config.instance.installation_root.to_s}" && node --print "try { require.resolve('react-native-worklets-core/package.json') } catch(e) { return '' }"`
output = `cd "#{Pod::Config.instance.installation_root.to_s}" && node --print "require.resolve('react-native-worklets-core/package.json')"`

if output.empty?
return nil
else
if $?.success? && !output.empty?
return File.dirname(output)
else
return nil
end
end

Expand Down

0 comments on commit 540755f

Please sign in to comment.