Skip to content

Commit

Permalink
added string type checking for remote origin (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
hoonsubin authored Dec 18, 2020
1 parent c9d0bb2 commit d87da7d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 2 additions & 0 deletions src/models/glitchGit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit d87da7d

Please sign in to comment.