Skip to content

Commit

Permalink
fix: don't check for update on ci
Browse files Browse the repository at this point in the history
  • Loading branch information
williamluke4 committed Jan 4, 2021
1 parent 6c6e328 commit 9dfb79b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"devDependencies": {
"@prisma/cli": "^2.14.0-dev.62",
"@types/adm-zip": "^0.4.33",
"@types/ci-info": "^2.0.0",
"@types/clui": "^0.3.0",
"@types/fs-extra": "^9.0.6",
"@types/git-url-parse": "^9.0.0",
Expand Down
3 changes: 2 additions & 1 deletion src/bin/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import { READMD_REGEX } from "../lib/markdown";
import { client, Settings } from "../lib/prisma";
import { sync } from "../lib/sync";
import { updater } from "../lib/update";
import ci from 'ci-info'

const homedir = os.homedir();
const configDir = fs.dir(path.join(homedir, ".config", "fster"));
Expand Down Expand Up @@ -56,7 +57,7 @@ const pkg = fs.read(
"json"
) as Partial<PackageJson>;
async function run() {
if (pkg.version && pkg.name && !pkg.version.includes('next')) {
if (!ci.isCI && pkg.version && pkg.name && !pkg.version.includes('next')) {
const updated = await updater({ name: pkg.name, version: pkg.version });
if (updated) {
logger.success("You may now rerun the last command");
Expand Down
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -757,6 +757,11 @@
resolved "https://registry.yarnpkg.com/@types/caseless/-/caseless-0.12.2.tgz#f65d3d6389e01eeb458bd54dc8f52b95a9463bc8"
integrity sha512-6ckxMjBBD8URvjB6J3NcnuAn5Pkl7t3TizAg+xdlzzQGSPSmBcXf8KoIH0ua/i+tio+ZRUHEXp0HEmvaR4kt0w==

"@types/ci-info@^2.0.0":
version "2.0.0"
resolved "https://registry.yarnpkg.com/@types/ci-info/-/ci-info-2.0.0.tgz#51848cc0f5c30c064f4b25f7f688bf35825b3971"
integrity sha512-5R2/MHILQLDCzTuhs1j4Qqq8AaKUf7Ma4KSSkCtc12+fMs47zfa34qhto9goxpyX00tQK1zxB885VCiawZ5Qhg==

"@types/cli-color@*":
version "2.0.0"
resolved "https://registry.yarnpkg.com/@types/cli-color/-/cli-color-2.0.0.tgz#dc64e32da0fb9ea1814300fb468a58e833ce71a6"
Expand Down

0 comments on commit 9dfb79b

Please sign in to comment.