@raycast/api 1.39.0 → 1.39.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/bin/ray +12 -6
  2. package/package.json +1 -1
package/bin/ray CHANGED
@@ -1,12 +1,20 @@
1
1
  #!/bin/bash
2
2
 
3
3
  # Determine the path for dist folder
4
- # Using readlink -f to follow up any symlinks that will appear when using `npx`
5
- script_path=$(readlink -f "${BASH_SOURCE:-$0}")
6
- bin_dir=$(dirname $script_path)
4
+ # Using 'readlink -f' is not an option as '-f' it's not available on older macOS versions
5
+ source=${BASH_SOURCE:-$0}
6
+ # resolve $source until the file is no longer a symlink
7
+ while [ -L "$source" ]; do
8
+ dir=$( cd -P "$( dirname "$source" )" >/dev/null 2>&1 && pwd )
9
+ source=$(readlink "$source")
10
+ # if $source was a relative symlink, we need to resolve it relative to the path where the symlink file was located
11
+ [[ $source != /* ]] && source=$dir/$source
12
+ done
13
+ bin_dir=$( cd -P "$( dirname "$source" )" >/dev/null 2>&1 && pwd )
7
14
  dist_dir=$(dirname $bin_dir)
15
+
8
16
  if [ -z "$bin_dir" ]; then
9
- echo "Unable to determine CLI path from symlink: ${BASH_SOURCE-$0}"
17
+ echo "Unable to determine CLI path for source: ${BASH_SOURCE:-$0}"
10
18
  exit 1
11
19
  fi
12
20
 
@@ -54,6 +62,4 @@ if [ "$1" == "npm-post-install" ]; then
54
62
  fi
55
63
 
56
64
  # Execute the CLI passing all parameters to it
57
- file /usr/local
58
-
59
65
  $ray_path "$@"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@raycast/api",
3
- "version": "1.39.0",
3
+ "version": "1.39.1",
4
4
  "description": "Build extensions for Raycast with React and Node.js.",
5
5
  "author": "Raycast Technologies Ltd.",
6
6
  "homepage": "https://developers.raycast.com",