Skip to content

Commit 427de32

Browse files
committed
check s build artifacts
1 parent 89a1e7d commit 427de32

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/javaMain.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ export default class JavaStartupAccelerationComponent {
1414
}
1515

1616
async index(params) {
17+
await this.checkSBuildArtifacts();
18+
1719
let args = await this.parseArgs(params.argsObj);
1820
let debug = args.debug;
1921
if (debug) {
@@ -266,6 +268,15 @@ export default class JavaStartupAccelerationComponent {
266268
return YAML.load(yamlContent);
267269
}
268270

271+
async checkSBuildArtifacts() {
272+
const path = join(process.cwd(), ".s", "build", "artifacts");
273+
if (existsSync(path)) {
274+
throw new Error("s build artifacts dir [" + path + "] should be deleted");
275+
} else {
276+
info("check s build artifacts: ok");
277+
}
278+
}
279+
269280
async readFileContent(fileName: string) {
270281
const path = join(process.cwd(), fileName);
271282
const isExists = existsSync(path);

0 commit comments

Comments
 (0)