Skip to content

Commit

Permalink
Fix match.
Browse files Browse the repository at this point in the history
  • Loading branch information
danfuzz committed Nov 26, 2024
1 parent 42a635e commit 8ec9dcd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/lib/bashy-node/node-project/fix-package-json
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,9 @@ function do-fix {
local fileDir="${filePath%/*}"

local packageName="${fileDir}"
if [[ ${packageName} =~ /@(.*)$ ]]; then
if [[ ${packageName} =~ /(@[^@/]+/[^@/]+)$ ]]; then
# The directory structure has the form `@<project>/<name>`.
packageName="${BASH_REMATCH[2]}"
packageName="${BASH_REMATCH[1]}"
else
# No `@<project>`, so just use the final directory name, and assume it's
# in `@this`.
Expand Down

0 comments on commit 8ec9dcd

Please sign in to comment.