Skip to content

Commit 3f8fe8a

Browse files
author
Ian Walter
committed
Fixing dangling dash issue on ns command
1 parent 56e09f3 commit 3f8fe8a

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.changeset/wet-moons-roll.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@generates/kdot": patch
3+
---
4+
5+
Fixing dangling dash issue on ns command

packages/kdot/lib/commands/ns.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export default async function ns (input) {
1616
const branch = await getGitBranch()
1717
logger.debug('Branch:', branch)
1818
if (branch) {
19-
namespace = slugify(input.prefix + branch).substr(0, 63)
19+
namespace = slugify(input.prefix + branch).substr(0, 63).replace(/-$/, '')
2020
logger.debug('Namespace:', namespace)
2121
} else {
2222
throw new Error('No namespace specified and could not be determined')

0 commit comments

Comments
 (0)