Skip to content

Commit

Permalink
deno fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
JQinglong committed Jun 26, 2023
1 parent 66ebcd5 commit acde2b7
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions libs/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export class InstallAction {
) {
if (url && options.file) {
console.log(
Colors.red("Can not use -f option and URL at the same time.")
Colors.red("Can not use -f option and URL at the same time."),
);
Deno.exit(1);
}
Expand All @@ -43,7 +43,7 @@ export class InstallAction {
}
if (options.file && options.pageInstall) {
console.log(
Colors.red("Can not use -f option and -P option at the same time.")
Colors.red("Can not use -f option and -P option at the same time."),
);
Deno.exit(1);
}
Expand All @@ -66,20 +66,20 @@ export class InstallAction {
console.log(Colors.red("The name already exists."));
console.log(
Colors.red(
"Use the -F option to force installation and overwrite existing files."
)
"Use the -F option to force installation and overwrite existing files.",
),
);
Deno.exit(1);
}
const fullPath = await installFromURL(
url,
options.name,
options.postProcesses,
parsedHeaders
parsedHeaders,
).catch((error) => {
console.error(
Colors.red("Failed to install."),
Colors.red(error.message)
Colors.red(error.message),
);
Deno.exit(1);
});
Expand All @@ -104,7 +104,7 @@ export class InstallAction {
const re = new RegExp(options.expression as string, "g");
let href = new URL(
link.getAttribute("href") as string,
options.pageInstall
options.pageInstall,
).toString();
if (re.test(href)) {
idx += 1;
Expand All @@ -113,7 +113,7 @@ export class InstallAction {
href,
dataName,
options.postProcesses,
parsedHeaders
parsedHeaders,
).catch((error) => {
console.log(Colors.red("Failed to pageInstall"));
console.log("target:" + href);
Expand All @@ -132,7 +132,7 @@ export class InstallAction {
const lockContentList = await installFromDimFile(
options.file || DEFAULT_DIM_FILE_PATH,
options.asyncInstall,
options.force
options.force,
).catch(() => {
console.log(Colors.red("Selecting other than json."));
Deno.exit(1);
Expand All @@ -144,7 +144,7 @@ export class InstallAction {
} else {
console.log("All contents have already been installed.");
console.log(
"Use the -F option to force installation and overwrite existing files."
"Use the -F option to force installation and overwrite existing files.",
);
}
}
Expand Down

0 comments on commit acde2b7

Please sign in to comment.