You've already forked hugo-extended
mirror of
https://github.com/jakejarvis/hugo-extended.git
synced 2025-09-15 22:35:31 -04:00
yarn ➡️ pnpm
This commit is contained in:
@@ -23,14 +23,12 @@ async function install() {
|
||||
const binFile = getBinFilename();
|
||||
|
||||
// stop here if there's nothing we can download
|
||||
if (!releaseFile) {
|
||||
if (!releaseFile)
|
||||
throw new Error(`Are you sure this platform is supported? See: https://github.com/gohugoio/hugo/releases/tag/v${version}`);
|
||||
}
|
||||
|
||||
// warn if platform doesn't support Hugo Extended, proceed with vanilla Hugo
|
||||
if (!isExtended(releaseFile)) {
|
||||
if (!isExtended(releaseFile))
|
||||
console.warn(`${logSymbols.info} Hugo Extended isn't supported on this platform, downloading vanilla Hugo instead.`);
|
||||
}
|
||||
|
||||
// download release from GitHub and verify its checksum
|
||||
const download = await downloader(getReleaseUrl(version, releaseFile), {
|
||||
|
@@ -44,14 +44,12 @@ export function getBinVersion(bin) {
|
||||
// Simply detect if the given file exists.
|
||||
export function doesBinExist(bin) {
|
||||
try {
|
||||
if (fs.existsSync(bin)) {
|
||||
if (fs.existsSync(bin))
|
||||
return true;
|
||||
}
|
||||
} catch (error) {
|
||||
// something bad happened besides Hugo not existing
|
||||
if (error.code !== "ENOENT") {
|
||||
if (error.code !== "ENOENT")
|
||||
throw error;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
Reference in New Issue
Block a user