@codacy/codacy-mcp 0.6.9 → 0.6.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -93,21 +93,17 @@ export class MacCodacyCli extends CodacyCli {
|
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
95
|
if (needsInitialization) {
|
|
96
|
-
const
|
|
97
|
-
? { 'api-token': this._accountToken }
|
|
98
|
-
: {};
|
|
99
|
-
// Repository params are required for the "api-token" flag to work; it only works all together
|
|
100
|
-
const repositoryAccess = this.repository && this.provider && this.organization
|
|
96
|
+
const initParams = (this._accountToken && this.repository && this.provider && this.organization
|
|
101
97
|
? {
|
|
102
98
|
provider: this.provider,
|
|
103
99
|
organization: this.organization,
|
|
104
100
|
repository: this.repository,
|
|
105
|
-
|
|
101
|
+
'api-token': this._accountToken,
|
|
106
102
|
}
|
|
107
|
-
: {};
|
|
103
|
+
: {});
|
|
108
104
|
try {
|
|
109
105
|
// initialize codacy-cli
|
|
110
|
-
await this.execAsync(`${this.getCliCommand()} init`,
|
|
106
|
+
await this.execAsync(`${this.getCliCommand()} init`, initParams);
|
|
111
107
|
}
|
|
112
108
|
catch (error) {
|
|
113
109
|
throw new Error(`Failed to initialize CLI: ${error}`);
|