Skip to content

Commit 8ec9dcd

Browse files
committed
Fix match.
1 parent 42a635e commit 8ec9dcd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/lib/bashy-node/node-project/fix-package-json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,9 @@ function do-fix {
9191
local fileDir="${filePath%/*}"
9292

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

0 commit comments

Comments
 (0)