mirror of
https://github.com/SrIzan10/sern-cli.git
synced 2026-05-01 11:05:17 +00:00
chore: some minor changes including formatting
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { greenBright, redBright } from 'colorette';
|
||||
import { greenBright, redBright, underline } from 'colorette';
|
||||
import { execa } from 'execa';
|
||||
import { findUp } from 'find-up';
|
||||
import ora from 'ora';
|
||||
@@ -104,7 +104,11 @@ async function git(data: Data) {
|
||||
spin.succeed('Git initialized!');
|
||||
} catch (error) {
|
||||
spin.fail(
|
||||
`${redBright('Failed')} to initialize git!\nTry to install it at https://git-scm.com\nSkipping for now.`
|
||||
`${redBright(
|
||||
'Failed'
|
||||
)} to initialize git!\nTry to install it at ${underline(
|
||||
'https://git-scm.com'
|
||||
)}\nSkipping for now.`
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,6 +36,7 @@ export async function installDeps(choice: PackageManagerChoice, name: string) {
|
||||
const result = await execa(choice, ['install'], {
|
||||
cwd: process.cwd() + '/' + name,
|
||||
}).catch(() => null);
|
||||
|
||||
if (!result || result?.failed) {
|
||||
spin.fail(`${redBright('Failed')} to install dependencies!`);
|
||||
process.exit(1);
|
||||
@@ -56,7 +57,11 @@ export async function cloneRepo(lang: string, name: string) {
|
||||
copyRecursiveSync(`templates/templates/${lang}`, name);
|
||||
fs.rmSync(`templates/`, { recursive: true, force: true });
|
||||
} catch (error) {
|
||||
console.log(`${redBright('✖ Failed')} to clone github templates repo. Install git and try again.`)
|
||||
console.log(
|
||||
`${redBright(
|
||||
'✖ Failed'
|
||||
)} to clone github templates repo. Install git and try again!`
|
||||
);
|
||||
process.exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user