From 7bba041da7723fd5f694d6a0d17de5b6b799e839 Mon Sep 17 00:00:00 2001 From: Jeff Dickey <216188+jdxcode@users.noreply.github.com> Date: Sun, 8 Apr 2018 23:03:15 -0700 Subject: [PATCH] fix: grab channel from version --- src/config.ts | 3 ++- src/pjson.ts | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/config.ts b/src/config.ts index 508a660a..3fa2af17 100644 --- a/src/config.ts +++ b/src/config.ts @@ -152,7 +152,8 @@ export class Config implements IConfig { this.pjson = plugin.pjson this.name = this.pjson.name this.version = this.pjson.version - this.channel = this.pjson.channel + const [, versionSuffix] = this.version.split('-') + this.channel = versionSuffix.split('.')[0] || 'stable' this.arch = (os.arch() === 'ia32' ? 'x86' : os.arch() as any) this.platform = os.platform() as any diff --git a/src/pjson.ts b/src/pjson.ts index c2e9e44f..6f91d832 100644 --- a/src/pjson.ts +++ b/src/pjson.ts @@ -10,7 +10,6 @@ export namespace PJSON { export interface Plugin extends PJSON { name: string version: string - channel?: string oclif: PJSON['oclif'] & { schema?: number title?: string