You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: src/main.ts
+29-10
Original file line number
Diff line number
Diff line change
@@ -93,7 +93,7 @@ async function main() {
93
93
consttoken=process.env.WOKWI_CLI_TOKEN;
94
94
if(token==null||token.length===0){
95
95
console.error(
96
-
`Error: Missing WOKWI_CLI_TOKEN environment variable. Please set it to your Wokwi token.\nGet your token at https://wokwi.com/dashboard/ci.`,
96
+
chalkTemplate`{red Error:} Missing {yellow WOKWI_CLI_TOKEN} environment variable. Please set it to your Wokwi token.\nGet your token at {yellow https://wokwi.com/dashboard/ci.`,
97
97
);
98
98
process.exit(1);
99
99
}
@@ -104,14 +104,24 @@ async function main() {
104
104
constconfigExists=existsSync(configPath);
105
105
106
106
if(!elf&&!configExists){
107
-
console.error(`Error: wokwi.toml not found in ${path.resolve(rootDir)}.`);
108
-
console.error('Run `wokwi-cli init` to automatically create a wokwi.toml file.');
107
+
console.error(
108
+
chalkTemplate`{red Error:} {yellow wokwi.toml} not found in {yellow ${path.resolve(
109
+
rootDir,
110
+
)}}.`,
111
+
);
112
+
console.error(
113
+
chalkTemplate`Run \`{green wokwi-cli init}\` to automatically create a {yellow wokwi.toml} file.`,
114
+
);
109
115
process.exit(1);
110
116
}
111
117
112
118
if(!existsSync(diagramFilePath)){
113
-
console.error(`Error: diagram file not found in ${diagramFilePath}`);
114
-
console.error('Run `wokwi-cli init` to automatically create a diagram.json file.');
119
+
console.error(
120
+
chalkTemplate`{red Error:} {yellow diagram.json} not found in {yellow ${diagramFilePath}}.`,
121
+
);
122
+
console.error(
123
+
chalkTemplate`Run \`{green wokwi-cli init}\` to automatically create a {yellow diagram.json} file.`,
124
+
);
115
125
process.exit(1);
116
126
}
117
127
@@ -133,14 +143,22 @@ async function main() {
133
143
}
134
144
135
145
if(!existsSync(firmwarePath)){
136
-
console.error(`Error: firmware file not found: ${path.resolve(firmwarePath)}`);
137
-
console.error('Please check the firmware path in your wokwi.toml configuration file.');
146
+
constfullPath=path.resolve(firmwarePath);
147
+
console.error(
148
+
chalkTemplate`{red Error:} {yellow firmware file} not found: {yellow ${fullPath}}.`,
149
+
);
150
+
console.error(
151
+
chalkTemplate`Please check the {yellow firmware} path in your {yellow wokwi.toml} configuration file.`,
152
+
);
138
153
process.exit(1);
139
154
}
140
155
141
156
if(!existsSync(elfPath)){
142
-
console.error(`Error: ELF file not found: ${path.resolve(elfPath)}`);
143
-
console.error('Please check the ELF path in your wokwi.toml configuration file.');
157
+
constfullPath=path.resolve(elfPath);
158
+
console.error(chalkTemplate`{red Error:} ELF file not found: {yellow ${fullPath}}.`);
159
+
console.error(
160
+
chalkTemplate`Please check the {yellow elf} path in your {yellow wokwi.toml} configuration file.`,
0 commit comments