Skip to content

Commit

Permalink
sanitize json output
Browse files Browse the repository at this point in the history
  • Loading branch information
dskvr committed Jan 19, 2024
1 parent e73958d commit 9861411
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/publish-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ jobs:
- name: Find Package
id: find_package
run: |
WORKSPACES_JSON="$(yarn workspaces info --json)"
WORKSPACES_JSON="$(yarn workspaces info --json)" # Get the raw JSON output from 'yarn workspaces info --json'
WORKSPACES_JSON="${WORKSPACES_JSON#*{}" # Remove any text before the first '{' character
WORKSPACES_JSON="${WORKSPACES_JSON%*}}" # Remove any text after the last '}' character
PKG_PATH=$(echo "$WORKSPACES_JSON" | jq -r '.data | fromjson | ."@nostrwatch/${{ matrix.package }}".location')
echo "THE PATH: $PKG_PATH" >> .fml
echo "the_path=$PKG_PATH" >> "$GITHUB_OUTPUT"
Expand Down

0 comments on commit 9861411

Please sign in to comment.