We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 70cfe1f commit 8bde77dCopy full SHA for 8bde77d
rosidl_gen/packages.js
@@ -33,7 +33,7 @@ function getPackageName(filePath, amentExecuted) {
33
}
34
35
if (amentExecuted) {
36
- return filePath.match(/\w+\/share\/(\w+)\//)[1];
+ return filePath.match(/[^/]+\/share\/([^/]+)\//)[1];
37
38
39
let folders = path.parse(filePath).dir.split('/');
@@ -52,7 +52,7 @@ function getSubFolder(filePath, amentExecuted) {
52
53
54
55
- return filePath.match(/\w+\/share\/\w+\/(\w+)\//)[1];
+ return filePath.match(/[^/]+\/share\/[^/]+\/([^/]+)\//)[1];
56
57
// If the |amentExecuted| equals to false, the file's extension will be assigned as
58
// the name of sub folder.
0 commit comments