diff --git a/package.json b/package.json index 68852fb..1a43079 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "glitch-deploy-tool", - "version": "0.1.5-alpha", + "version": "0.1.6-alpha", "description": "CLI tool for deploying files to Glitch.com", "keywords": [ "glitch.com", diff --git a/src/models/glitchGit.ts b/src/models/glitchGit.ts index 1f69b49..58fe2d3 100644 --- a/src/models/glitchGit.ts +++ b/src/models/glitchGit.ts @@ -30,6 +30,8 @@ export default class GlitchRepo { private _authorInfo: CommitAuthor; constructor(remoteOrigin: string, logMessage = false, commitAs?: CommitAuthor) { + if (!remoteOrigin || typeof remoteOrigin !== 'string') throw new Error('Please provide a remote origin'); + if (!remoteOrigin.startsWith('https://')) { // add the https prefix if the user did not provide one this._remoteOrigin = 'https://' + remoteOrigin;