Skip to content

Commit a8d8f57

Browse files
committed
chore: rm prefixed error msg
Signed-off-by: Dwi Siswanto <me@dw1.io>
1 parent f67be5d commit a8d8f57

File tree

4 files changed

+16
-16
lines changed

4 files changed

+16
-16
lines changed

dist/index.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ function get_slim() {
5252
}
5353
}
5454
catch (_a) {
55-
throw new Error(`ERROR! Could not get the Slim version ${VER}.`);
55+
throw new Error(`Could not get the Slim version ${VER}.`);
5656
}
5757
URL = `https://downloads.dockerslim.com/releases/${VER}`;
5858
// Get kernel name and machine architecture.
@@ -81,11 +81,11 @@ function get_slim() {
8181
}
8282
}
8383
else {
84-
throw new Error(`ERROR! ${KERNEL} is not a supported platform.`);
84+
throw new Error(`${KERNEL} is not a supported platform.`);
8585
}
8686
// Was a known distribution detected?
8787
if (!DIST) {
88-
throw new Error(`ERROR! ${MACHINE} is not a supported architecture.`);
88+
throw new Error(`${MACHINE} is not a supported architecture.`);
8989
}
9090
// Derive the filename
9191
FILENAME = `dist_${DIST}.${EXT}`;
@@ -97,7 +97,7 @@ function get_slim() {
9797
const_1.core.debug('Restoring cache');
9898
const cacheResult = yield const_1.cache.restoreCache([cachePath], cacheKey, [`${cachePrefix}-`]);
9999
if (typeof cacheResult === 'undefined') {
100-
throw new Error(`ERROR! Cache miss: ${cacheKey} was not found in the cache.`);
100+
throw new Error(`Cache miss: ${cacheKey} was not found in the cache.`);
101101
}
102102
const_1.core.debug(`${cacheKey} cache was restored.`);
103103
SLIM_PATH = cachePath;
@@ -132,7 +132,7 @@ function get_slim() {
132132
});
133133
}
134134
else {
135-
throw new Error('ERROR! Unexpected file extension.');
135+
throw new Error('Unexpected file extension.');
136136
}
137137
SLIM_PATH = const_1.path.join(const_1.TMP_DIR, `dist_${DIST}`);
138138
const_1.core.debug(`Copying ${SLIM_PATH} -> (${cachePath})`);
@@ -161,7 +161,7 @@ function run() {
161161
const report = JSON.parse(data);
162162
const_1.core.setOutput('report', report);
163163
if (report.state == 'error') {
164-
throw new Error('ERROR! Cannot build over target');
164+
throw new Error('Cannot build over target');
165165
}
166166
const [image, tag] = report.target_reference.split(':');
167167
if (inputOverwrite && tag) {
@@ -174,7 +174,7 @@ function run() {
174174
});
175175
}
176176
if (inputTag == "") {
177-
const_1.core.setFailed('ERROR! Tag cannot be empty.');
177+
const_1.core.setFailed('Tag cannot be empty.');
178178
}
179179
try {
180180
run();

dist/pre.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ try {
66
const_1.core.info('docker command OK!');
77
}
88
catch (_a) {
9-
const_1.core.setFailed('ERROR! docker: command not found');
9+
const_1.core.setFailed('docker: command not found');
1010
}

src/index.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ async function get_slim() {
4646
VER = inputVersion;
4747
}
4848
} catch {
49-
throw new Error(`ERROR! Could not get the Slim version ${VER}.`);
49+
throw new Error(`Could not get the Slim version ${VER}.`);
5050
}
5151

5252
URL = `https://downloads.dockerslim.com/releases/${VER}`;
@@ -73,12 +73,12 @@ async function get_slim() {
7373
DIST = 'mac_m1';
7474
}
7575
} else {
76-
throw new Error(`ERROR! ${KERNEL} is not a supported platform.`);
76+
throw new Error(`${KERNEL} is not a supported platform.`);
7777
}
7878

7979
// Was a known distribution detected?
8080
if (!DIST) {
81-
throw new Error(`ERROR! ${MACHINE} is not a supported architecture.`);
81+
throw new Error(`${MACHINE} is not a supported architecture.`);
8282
}
8383

8484
// Derive the filename
@@ -96,7 +96,7 @@ async function get_slim() {
9696
);
9797

9898
if (typeof cacheResult === 'undefined') {
99-
throw new Error(`ERROR! Cache miss: ${cacheKey} was not found in the cache.`)
99+
throw new Error(`Cache miss: ${cacheKey} was not found in the cache.`)
100100
}
101101

102102
core.debug(`${cacheKey} cache was restored.`)
@@ -132,7 +132,7 @@ async function get_slim() {
132132
cwd: TMP_DIR
133133
});
134134
} else {
135-
throw new Error('ERROR! Unexpected file extension.');
135+
throw new Error('Unexpected file extension.');
136136
}
137137

138138
SLIM_PATH = path.join(TMP_DIR, `dist_${DIST}`);
@@ -168,7 +168,7 @@ async function run() {
168168
core.setOutput('report', report);
169169

170170
if (report.state == 'error') {
171-
throw new Error('ERROR! Cannot build over target');
171+
throw new Error('Cannot build over target');
172172
}
173173

174174
const [image, tag] = report.target_reference.split(':');
@@ -185,7 +185,7 @@ async function run() {
185185
}
186186

187187
if (inputTag == "") {
188-
core.setFailed('ERROR! Tag cannot be empty.');
188+
core.setFailed('Tag cannot be empty.');
189189
}
190190

191191
try {

src/pre.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ try {
44
io.which('docker', true);
55
core.info('docker command OK!');
66
} catch {
7-
core.setFailed('ERROR! docker: command not found');
7+
core.setFailed('docker: command not found');
88
}

0 commit comments

Comments
 (0)