Skip to content

Commit

Permalink
Fix bug where global org/domain winds up in remote command name
Browse files Browse the repository at this point in the history
  • Loading branch information
azimux committed Feb 10, 2024
1 parent d422a04 commit 142090e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
GIT
remote: foobara
revision: b04eab7528d24e71f2d490fa342e0d2614146500
revision: ff87027b163493c16d665acab1ef5d5c8574cbbc
branch: main
specs:
foobara (0.0.1)
Expand Down
13 changes: 12 additions & 1 deletion src/remote_generator/templates/base/RemoteCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,18 @@ export default abstract class RemoteCommand<Inputs, Result, CommandError extends
}

static get fullCommandName (): string {
return [this.organizationName, this.domainName, this.commandName].filter(Boolean).join('::')
const path = []

if (this.organizationName != null && this.organizationName !== "GlobalOrganization") {
path.push(this.organizationName)
}
if (this.domainName != null && this.domainName !== "GlobalDomain") {
path.push(this.domainName)
}
if (this.commandName != null) {
path.push(this.commandName)
}
return path.join('::')
}

get fullCommandName (): string {
Expand Down

0 comments on commit 142090e

Please sign in to comment.