Giter Club home page Giter Club logo

tiny-scripts's Introduction

Collection of small scripts

The easiest way to get these is via the Homebrew tap, as the install will take care of any eventual dependencies that are not already available on your system.

app-icon-extract

Extract app bundle icon as png

cask-analytics

Show analytics information for casks in the main taps

cask-repair

Quickly repair outdated/broken Casks from homebrew-cask

gfv (gif from video)

Make animated gifs from a video file

human-media-time

Calculate and present total running time of media files in a human-readable way

linux-usb

Create bootable Linux USB sticks from ISOs on macOS

lossless-compress

Losslessly compress files

makeicns

Make an icns file from a png

mtg-wallpapers

Download Magic: The Gathering wallpapers

photo-date-rename

Rename image files to the date and time they were taken

pingpong

Stitch a video with its reversed version, for continuous loops

podbook

Generate a podcast RSS feed for audiobooks

progressbar

Overlay a progress bar on videos or gifs

ringtonemaker

Convert a video or audio file to an iPhone ringtone

rss-item-sort

Sort RSS items by number in title and upload the result to temporary hosting

seren

Rename files in a numerical sequence

upload-file

Upload paths, with support for several file hosts


License

The Unlicense (Public Domain, essentially)

tiny-scripts's People

Contributors

aguynamedryan avatar amorymeltzer avatar cjcjameson avatar commitay avatar core-code avatar decrement avatar jasmas avatar jawshooah avatar jbylsma avatar mtrolley avatar muescha avatar peterlewis avatar quanglam2807 avatar razvanazamfirei avatar ropdebee avatar seekingmeaning avatar toonetown avatar tsparber avatar vitorgalvao avatar ykursadkaya avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tiny-scripts's Issues

Error submitting pull request

Hello 👋

I am trying to update my cask using cask-repair morkro-papyrus, but it I get the following error message:

diff --git a/Casks/morkro-papyrus.rb b/Casks/morkro-papyrus.rb
index 6babb63..4c1fdc7 100644
--- a/Casks/morkro-papyrus.rb
+++ b/Casks/morkro-papyrus.rb
@@ -1,10 +1,10 @@
 cask 'morkro-papyrus' do
-  version '1.0.0'
-  sha256 'cd88cd942504aa676879d86ba7c435ba8250db05525f0482a0c3812d069abf21'
+  version '1.0.2'
+  sha256 '56224eadffc9be30a240790487919406fb6ffc8e952c1446de696850b209bca8'
 
   url "https://github.com/morkro/papyrus/releases/download/#{version}/Papyrus-osx-#{version}.zip"
   appcast 'https://github.com/morkro/papyrus/releases.atom',
-          checkpoint: '8c12e03261b6509c4f1c3269fa0ab07324095c829f7cff3cc309b77c60ecc0a8'
+          checkpoint: 'f22ccbcd9ec38efaf29618ee61c2c3ede100469afeb5c16502a943e0ddeb00d1'
   name 'Papyrus'
   homepage 'https://github.com/morkro/papyrus'
 
------------------------------------------------------------------------------------------------------------------
Is everything correct? ([y]es / [n]o / [e]dit) y
Submitting…
Username for 'https://github.com': morkro
Password for 'https://[email protected]': 
remote: Invalid username or password.
fatal: Authentication failed for 'https://github.com/morkro/homebrew-cask/'
Error creating pull request: Unprocessable Entity (HTTP 422)
Invalid value for "head"
Error creating pull request: Unprocessable Entity (HTTP 422)
Invalid value for "head"

There was an error submitting the pull request. Please open a bug report on the repo for this script.

I have read all previously submitted issues related to that topic, but none of the solutions fixed my problem :(

cask-repair Bad credentials

After pressing y to confirm all is correct, cask-repair failes saying 401 bad credentials. Log below

Is everything correct? ([y]es / [n]o / [e]dit) y
Submitting…

You need a passphrase to unlock the secret key for
user: "Conor Randall <[email protected]>"
4096-bit RSA key, ID 22570890, created 2016-12-03

Error creating pull request: Unauthorized (HTTP 401)
Bad credentials
Error creating pull request: Unauthorized (HTTP 401)
Bad credentials

There was an error submitting the pull request. Please open a bug report on the repo for this script (https://github.com/vitorgalvao/tiny-scripts).

cask-repair: more specific branch names

The update-{{cask}} naming convention for branches created by cask-repair seems a bit too broad, especially since --delete-branches deletes any branches matching that convention. It's very possible that this step would clobber branches completely unrelated to cask-repair. I'd suggest as an alternative: cask-repair/update-{{cask}}.

Cannot update cask

/usr/local/Cellar/cask-repair/0.27.0

$ outdated_cask='synergy'
$ github_user='miketheman'
$ cd "$(brew --repository)/Library/Taps/caskroom/homebrew-cask/Casks"
$ cask-repair --pull origin --push $github_user $outdated_cask

# supply new version '1.8.4,a6ff9079'
...
Is everything correct? You can also make further manual edits (y/n/e) y
Submitting…
fatal: 'miketheman' does not appear to be a git repository
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
error: the requested upstream branch 'miketheman/cask-repair_update-synergy' does not exist
hint:
hint: If you are planning on basing your work on an upstream
hint: branch that already exists at the remote, you may need to
hint: run "git fetch" to retrieve it.
hint:
hint: If you are planning to push out a new local branch that
hint: will track its remote counterpart, you may want to use
hint: "git push -u" to set the upstream config as you push.
Error creating pull request: Unprocessable Entity (HTTP 422)
Invalid value for "head"
Error creating pull request: Unprocessable Entity (HTTP 422)
Invalid value for "head"

There was an error submitting the pull request. Have you forked the repo and made sure the pull and push remotes exist?

Is there another debugging stop I should take?

Make cask-repair work for contributors without push access to main repo

Just tried out cask-repair (It's pretty helpful), but it looks like it doesn't want to work for me as I don't have push access to caskroom/homebrew-cask (as I'm not a maintainer).

Any way to modify it so that it pushes to adityadalal924/homebrew-cask instead?

Logs for more clarity:

 [.../homebrew-cask/Casks] > cask-repair amethyst.rb 
Already on 'master'
Your branch is up-to-date with 'origin/master'.
fatal: 'upstream' does not appear to be a git repository
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
Switched to a new branch 'update-amethyst'

{snip}

Type the new version (or leave blank to abort)
> 0.9.5
==> Fetching resources for Cask ./amethyst.rb
==> Downloading http://ianyh.com/amethyst/versions/Amethyst-0.9.5.zip
######################################################################## 100.0%
==> Success! Downloaded to -> /Library/Caches/Homebrew/amethyst-0.9.5.zip
audit for amethyst: passed

{snip}

Is everything correct? You can also make further manual edits (y/n/e) y[update-amethyst a5f902b] updated amethyst (0.9.5)
 1 file changed, 1 insertion(+), 1 deletion(-)
remote: Permission to caskroom/homebrew-cask.git denied to adityadalal924.
fatal: unable to access 'https://github.com/caskroom/homebrew-cask/': The requested URL returned error: 403
HEAD is now at a5f902b updated amethyst (0.9.5)
Switched to branch 'master'
Your branch is up-to-date with 'origin/master'.
Deleted branch update-amethyst (was a5f902b).

Submitted

Git Info, if it helps:

 [.../homebrew-cask/Casks] > git branch
* master
 [.../homebrew-cask/Casks] > git branch -r
  adityadalal924/master
  origin/HEAD -> origin/master
  origin/master
 [.../homebrew-cask/Casks] > git remote -v
adityadalal924  https://github.com/adityadalal924/homebrew-cask (fetch)
adityadalal924  https://github.com/adityadalal924/homebrew-cask (push)
origin  https://github.com/caskroom/homebrew-cask (fetch)
origin  https://github.com/caskroom/homebrew-cask (push)

Let me know if you need any more info (or if I just configured my git wrong). Thanks!

hub installed but cask-repair says it's not

When I try to run cask-repair, it tells me that I need to install hub, however I've had hub installed for over a year and use it daily. Let me know if you need any more info or if this is a known issue. I checked the closed issues and didn't find anything related to this.

❯ cask-repair --help

This script requires 'hub' installed and configured.
If you have [Homebrew](http://brew.sh), you can install it with 'brew install hub'.
To configure it, run 'cd /usr/local && hub issue'. Your Github password will be required, but is never stored.

❯ which hub
/usr/local/bin/hub

❯ cask --version
0.60.0 (git revision 52547; last commit 60 minutes ago)

OS X 10.11.4
cask v0.60

[FR]Automatic unshallow in cask-repair

Brew and taps clones are shallow by default.
Please implement feature that will detect and automatically unshallow the clone, thanks.
Also it may be useful to tap it with --full flag. I'm using following script by myself

# !bash
if hash brew 2>/dev/null; then
	cd `brew --prefix`/Homebrew/Library/Taps/
	for d in *; do 
		cd $d
		echo "unshallowing all in $d"
		for f in *; do
			cd $f
			echo "unshallowing $f"
			git fetch --unshallow
			git checkout master -f
		  	cd ..
		done
		cd ..
	done
fi

Cask-repair won't work if Taps remote url are not in HTTP (ie. force ssh via gitconfig)

Hi there,

I am currently running cask-repair on my machine for 6 month now and I noticed that I was not able to launch the script without commenting the following line in my gitconfig.

[url "[email protected]:"]
    insteadOf = https://github.com/

The error returned being:

`origin` is pointing to an incorrect remote ([email protected]:caskroom/homebrew-versions). It must start with https://github.com/caskroom/.

This causes a problem for me as I only push via ssh to Github and if this is not set I am not able to commit. Thus I need to comment those 2 lines before launching the script and un-comment them just after validating my modifications.

Would it be possible to accept both [email protected]:caskroom/ as well as https://github.com/caskroom/ as remote ?

This issue might arise for multiple people that forces this remote (this is one of the workaround to run go get on private repository for example).

Thanks a lot

Try some edge cases of the script

Submit a second time

when i try to run the script a second time then i get this error:

Submitting…
Error creating pull request: Unprocessable Entity (HTTP 422)
A pull request already exists for muescha:cask-repair_update-dash.
Error creating pull request: Unprocessable Entity (HTTP 422)
A pull request already exists for muescha:cask-repair_update-dash.

There was an error submitting the pull request. Please open a bug report on the repo for this script.

i think in this case it should just show a note:

A pull request already exists for muescha:cask-repair_update-dash.
the commits are updated.

Submit a second time but with other Version number 4.0.2

for example when the Version changes again and the pull request is not accepted

diff --git a/Casks/dash.rb b/Casks/dash.rb
index f9dff0b..ccf7f16 100644
--- a/Casks/dash.rb
+++ b/Casks/dash.rb
@@ -1,10 +1,10 @@
 cask 'dash' do
-  version '4.0.0'
-  sha256 'dadd3c5ba718053cf7797cb31cc2aa26779e0ffe09a2fd1e8ca19f80f63c9ab2'
+  version '4.0.2'
+  sha256 '2ef4d0721a89feb680bb416fd7694cbec5441df442b64aabb8b7abbaa5c9b3f3'
 
   url "https://kapeli.com/downloads/v#{version.major}/Dash.zip"
   appcast "https://kapeli.com/Dash#{version.major}.xml",
-          checkpoint: '8099212241b4aa0752094cc40df311037be1dab2c87389f988022fceb53661f4'
+          checkpoint: 'ed127f51a54c198287e90ea386f6b746c3dc2b78bc8d061c5b52d6e9919588e4'
   name 'Dash'
   homepage 'https://kapeli.com/dash'
 
--------------------------------------------------------------------------------------------------------------------------------------------------------
Is everything correct? ([y]es / [n]o / [e]dit) y
Submitting…
Aborted: 1 commits are not yet pushed to muescha/cask-repair_update-dash
(use `-f` to force submit a pull request anyway)
Aborted: 1 commits are not yet pushed to muescha/cask-repair_update-dash
(use `-f` to force submit a pull request anyway)

There was an error submitting the pull request. Please open a bug report on the repo for this script.

in this case it becomes a little messy:

bildschirmfoto 2017-02-21 um 20 36 54

there is an error this error:

1 commits are not yet pushed to muescha/cask-repair_update-dash

but the commit is submitted to the pull request

then script it should say:

A pull request already exists for muescha:cask-repair_update-dash.
the commits are updated.

Pull Request Name is not updated

the pull request name don't show the new version 4.0.2 (it is still at 4.0.1), but the commit is at 4.0.2

Error creating pull request: Unprocessable Entity (HTTP 422)

$ cask-repair macid
Updating taps… Updated 2 taps (caskroom/cask, caskroom/versions).
No changes to formulae.
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
cask 'macid' do
  version '1.3.5'
  sha256 'fdb37485748ad774e6e78e5d9134ce355aa5227e2926206a0e2314cc660ae452'

  url "https://macid.co/app/#{version}/MacID%20for%20macOS.zip"
  name 'MacID'
  homepage 'https://macid.co/'

  depends_on macos: '>= :yosemite'

  app 'MacID.app'

  postflight do
    suppress_move_to_applications
  end

  zap delete: '~/Library/Preferences/com.kanecheshire.MacIDOSX.plist'
end
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Type the new version (or leave blank to use current one, or use `s` to skip)
> 1.3.6
==> Downloading external files for Cask ./macid.rb
==> Downloading https://macid.co/app/1.3.6/MacID%20for%20macOS.zip
######################################################################## 100.0%
==> No checksum defined for Cask macid, skipping verification
==> Success! Downloaded to -> /Users/halbert/Library/Caches/Homebrew/Cask/macid--1.3.6.zip
diff --git a/Casks/macid.rb b/Casks/macid.rb
index 4c64f6005..88719183d 100644
--- a/Casks/macid.rb
+++ b/Casks/macid.rb
@@ -1,6 +1,6 @@
 cask 'macid' do
-  version '1.3.5'
-  sha256 'fdb37485748ad774e6e78e5d9134ce355aa5227e2926206a0e2314cc660ae452'
+  version '1.3.6'
+  sha256 'b13c7018e073007ec5ad2e2b8573b0d1dae7d7be77fb380ac0055ba269fdf80b'

   url "https://macid.co/app/#{version}/MacID%20for%20macOS.zip"
   name 'MacID'
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Is everything correct? ([y]es / [n]o / [e]dit) y
Submitting…
Error creating pull request: Unprocessable Entity (HTTP 422)
Invalid value for "head"
Error creating pull request: Unprocessable Entity (HTTP 422)
Invalid value for "head"

There was an error submitting the pull request. Please open a bug report on the repo for this script (https://github.com/vitorgalvao/tiny-scripts).

cask-repair "failed to change to directory of [cask]"

screen shot 2017-04-17 at 23 16 19

screen shot 2017-04-17 at 23 15 57

I am unable to reproduce this issue with other casks (at least, I haven't found one that reproduces this issue), however it happens every time I attempt to use the cask-repair script to update this cask, chirp-daily. I've tried running cask-repair -e chirp-daily but the same error is produced.

Can't update Cask via cask-repair anymore

I recently updated two times a black-screen Cask, but "something wrong" happens and now on every package I tried, my console output looks like this:

➜  Casks git:(master) cask-repair --pull origin --push Igloczek black-screen
----------------------------------------------------------------------------------------------
cask 'black-screen' do
  version '0.2.43'
  sha256 'fd3a153bbc8d0f43d4da42ef8d9674ab574b88cf1740a7030ace30e2e9ef04c1'

  url "https://github.com/shockone/black-screen/releases/download/v#{version}/black-screen-#{version}-mac.zip"
  appcast 'https://github.com/shockone/black-screen/releases.atom',
          checkpoint: '4a419b8c71863c1782ebd6fc6c8b14cdc7986a13247392d4d600f575a7778c14'
  name 'Black Screen'
  homepage 'https://github.com/shockone/black-screen'
  license :mit

  app 'Black Screen.app'
end
----------------------------------------------------------------------------------------------
Type the new version (or leave blank to use the current one)
> 0.2.48
==> Downloading external files for Cask ./black-screen.rb
==> Downloading https://github.com/shockone/black-screen/releases/download/v0.2.48/black-scree
######################################################################## 100,0%
==> No checksum defined for Cask black-screen, skipping verification
==> Success! Downloaded to -> /Users/igloczek/Library/Caches/Homebrew/Cask/black-screen--0.2.4
diff --git a/Casks/black-screen.rb b/Casks/black-screen.rb
index 3bda2aa..eb786c3 100644
--- a/Casks/black-screen.rb
+++ b/Casks/black-screen.rb
@@ -1,10 +1,10 @@
 cask 'black-screen' do
-  version '0.2.43'
-  sha256 'fd3a153bbc8d0f43d4da42ef8d9674ab574b88cf1740a7030ace30e2e9ef04c1'
+  version '0.2.48'
+  sha256 '38f5c7c252e14874d4c7d5202774e108c6b6519fbed00f0c719d3a6438a66a8f'

   url "https://github.com/shockone/black-screen/releases/download/v#{version}/black-screen-#{version}-mac.zip"
   appcast 'https://github.com/shockone/black-screen/releases.atom',
-          checkpoint: '4a419b8c71863c1782ebd6fc6c8b14cdc7986a13247392d4d600f575a7778c14'
+          checkpoint: '8a7cd91f6e9f869c06663e31e22e65770b2f2efa1860b53f377274d4f650acc9'
   name 'Black Screen'
   homepage 'https://github.com/shockone/black-screen'
   license :mit
------------------------------------------------------------------------------------------------------------------
•
------------------------------------------------------------------------------------------------------------------
Is everything correct? You can also make further manual edits (y/n/e) y
diff --git a/Casks/black-screen.rb b/Casks/black-screen.rb
index 3bda2aa..eb786c3 100644
--- a/Casks/black-screen.rb
+++ b/Casks/black-screen.rb
@@ -1,10 +1,10 @@
 cask 'black-screen' do
-  version '0.2.43'
-  sha256 'fd3a153bbc8d0f43d4da42ef8d9674ab574b88cf1740a7030ace30e2e9ef04c1'
+  version '0.2.48'
+  sha256 '38f5c7c252e14874d4c7d5202774e108c6b6519fbed00f0c719d3a6438a66a8f'

   url "https://github.com/shockone/black-screen/releases/download/v#{version}/black-screen-#{version}-mac.zip"
   appcast 'https://github.com/shockone/black-screen/releases.atom',
-          checkpoint: '4a419b8c71863c1782ebd6fc6c8b14cdc7986a13247392d4d600f575a7778c14'
+          checkpoint: '8a7cd91f6e9f869c06663e31e22e65770b2f2efa1860b53f377274d4f650acc9'
   name 'Black Screen'
   homepage 'https://github.com/shockone/black-screen'
   license :mit
-------------------------------------------------------------------------------------------------------------------
•
•
-------------------------------------------------------------------------------------------------------------------
Is everything correct? You can also make further manual edits (y/n/e)

It looks like one of this commands fails silently:

  • $(brew cask style --fix "${cask_file}" 2>/dev/null)
  • $(brew cask audit "${cask_file}" 2>/dev/null)

Every time I press y I got a new bellow diff (it's red), instead of some error msg.
Any idea what might happened or how to debug this?

cask-repair stuck in infinite loop

Last week (on 9/14/16), I was able to successfully submit a cask update using cask-repair. Today, however, using the exact same workflow, the pull request never gets submitted. As expected, the content of the cask is shown in the terminal, I am prompted for the new version number, the specified version is downloaded, and the diff for the affected cask file is displayed, but when I type y in response to the Is everything correct? prompt, it simply re-displays the diff, no matter how many times I type y.

Immediately under the diff, there's a red dot with horizontal lines above and below it. The first time this happened, the text ==> Installing or updating 'rubocop-cask' gem was displayed next to the dot (see below for details), but after aborting that update, there's now nothing next to the dot. Any idea how to fix this? Thanks.

cask-repair --pull origin --push pkq rstudio-preview

 -----------------------------------------------------------------------------------------------------------------------
cask 'rstudio-preview' do
  version '1.0.16'
  sha256 'ebecfd21fa1563ff3bf3d619ae574ccba46baa6f767039c764bea53e8568cbf3'

  # amazonaws.com/rstudio-dailybuilds was verified as official when first introduced to the cask
  url "https://s3.amazonaws.com/rstudio-dailybuilds/RStudio-#{version}.dmg"
  name 'RStudio'
  homepage 'http://www.rstudio.com/ide/download/preview'
  license :affero

  app 'RStudio.app'

  zap delete: '~/.rstudio-desktop'
end
 -----------------------------------------------------------------------------------------------------------------------
Type the new version (or leave blank to use the current one)
> 1.0.21
==> Downloading external files for Cask ./rstudio-preview.rb
==> Downloading https://s3.amazonaws.com/rstudio-dailybuilds/RStudio-1.0.21.dmg
######################################################################## 100.0%
==> No checksum defined for Cask rstudio-preview, skipping verification
==> Success! Downloaded to -> /Users/pkennedy/Library/Caches/Homebrew/Cask/rstudio-preview--1.0.21.dmg
diff --git a/Casks/rstudio-preview.rb b/Casks/rstudio-preview.rb
index 69f5c97..e51792e 100644
--- a/Casks/rstudio-preview.rb
+++ b/Casks/rstudio-preview.rb
@@ -1,6 +1,6 @@
 cask 'rstudio-preview' do
-  version '1.0.16'
-  sha256 'ebecfd21fa1563ff3bf3d619ae574ccba46baa6f767039c764bea53e8568cbf3'
+  version '1.0.21'
+  sha256 '5ce09ae48021e571e26fdfa8ccdc738374abc3058ea9099472bfd72de470dd4a'

   # amazonaws.com/rstudio-dailybuilds was verified as official when first introduced to the cask
   url "https://s3.amazonaws.com/rstudio-dailybuilds/RStudio-#{version}.dmg"
 -----------------------------------------------------------------------------------------------------------------------
• ==> Installing or updating 'rubocop-cask' gem
Successfully installed public_suffix-2.0.2
Successfully installed rainbow-2.1.0
Successfully installed ast-2.3.0
Successfully installed parser-2.3.1.4
Successfully installed powerpack-0.1.1
Successfully installed ruby-progressbar-1.8.1
Successfully installed unicode-display_width-1.1.1
Successfully installed rubocop-0.41.2
Successfully installed rubocop-cask-0.8.3
9 gems installed
 -----------------------------------------------------------------------------------------------------------------------
Is everything correct? You can also make further manual edits (y/n/e) y
diff --git a/Casks/rstudio-preview.rb b/Casks/rstudio-preview.rb
index 69f5c97..e51792e 100644
--- a/Casks/rstudio-preview.rb
+++ b/Casks/rstudio-preview.rb
@@ -1,6 +1,6 @@
 cask 'rstudio-preview' do
-  version '1.0.16'
-  sha256 'ebecfd21fa1563ff3bf3d619ae574ccba46baa6f767039c764bea53e8568cbf3'
+  version '1.0.21'
+  sha256 '5ce09ae48021e571e26fdfa8ccdc738374abc3058ea9099472bfd72de470dd4a'

   # amazonaws.com/rstudio-dailybuilds was verified as official when first introduced to the cask
   url "https://s3.amazonaws.com/rstudio-dailybuilds/RStudio-#{version}.dmg"
 -----------------------------------------------------------------------------------------------------------------------
• ==> Installing or updating 'rubocop-cask' gem
Successfully installed public_suffix-2.0.2
Successfully installed rainbow-2.1.0
Successfully installed ast-2.3.0
Successfully installed parser-2.3.1.4
Successfully installed powerpack-0.1.1
Successfully installed ruby-progressbar-1.8.1
Successfully installed unicode-display_width-1.1.1
Successfully installed rubocop-0.41.2
Successfully installed rubocop-cask-0.8.3
9 gems installed
•

Allow to edit the download path

in my case the app apple-event changed the download url form .../AppleEvents_v0.6.zip to AppleEvents_v0.7_r.zip. (see Releases/appcast.xml )

it would be nice if there is an additional question after the input for the version:

Type the new version (or leave blank to use the current one)
> 0.7
we use this url template:
https://github.com/insidegui/AppleEvents/releases/download/#{version}/AppleEvents_v#{version}.zip
download url with version "0.7":
https://github.com/insidegui/AppleEvents/releases/download/0.7/AppleEvents_v0.7.zip
Is the url template correct? You can also make further manual edits (y/n/e)
https://github.com/insidegui/AppleEvents/releases/download/#{version}/AppleEvents_v#{version}_r.zip
we use this url template:
https://github.com/insidegui/AppleEvents/releases/download/#{version}/AppleEvents_v#{version}_r.zip
download url with version "0.7":
https://github.com/insidegui/AppleEvents/releases/download/0.7/AppleEvents_v0.7_r.zip
Is the url template correct? You can also make further manual edits (y/n/e)
[...]

Is there any way to specify a notification on app launch?

Thanks for making this. Solves my issue of custom icon with -open URL option.

Is there any way to specify the default notification displayed when the app is opened. Currently it has title "Terminal" with a blank message.

It would be helpful to be able to notify users that the app is a part of another function/service, i.e. please don't delete or move.

`cask-repair` failures

Going to post failures for cask-repair here, as i'm verifying your PRs


Fails on glyphs.rb (version 2.2.2-825)

Type the new version (or leave blank to abort)
> 2.2.2-825
==> Downloading external files for Cask ./glyphs.rb
==> Downloading https://updates.glyphsapp.com/Glyphs2.2.2-825.zip
######################################################################## 100.0%
==> No checksum defined for Cask glyphs, skipping verification
==> Success! Downloaded to -> /Library/Caches/Homebrew/glyphs-2.2.2-825.zip
curl: (3) <url> malformed
audit for glyphs: passed
Is everything correct? You can also make further manual edits (y/n/e) 

There is a checksum, and it should be verifying it, also a curl error.

cask-repair: Default remotes

Currently working on caskroom/CONTRIBUTING

Now, in our directions, we say to add a remote with the name "$github_user".

This ends up with them having something like (git remote -v):

adityadalal924  https://github.com/adityadalal924/homebrew-cask (fetch)
adityadalal924  https://github.com/adityadalal924/homebrew-cask (push)
origin  https://github.com/caskroom/homebrew-cask (fetch)
origin  https://github.com/caskroom/homebrew-cask (push)

However, this isn't the default for cask-repair.

Thoughts? (or should a line just be added saying to explicitly define remotes when calling the command?)

Setup issue

Hello vitorgalvao, first off thanks for the great cask-repair script.

I have just performed a fresh install of macOS, and when I was setting up cask-repair for the first time as per the instructions in CONTRIBUTING.md on Homebrew Cask, I noticed something a little weird.

The instructions say

# fork homebrew-cask to your account - only needed once
cd "$(brew --repository)/Library/Taps/caskroom/homebrew-cask/Casks"
hub fork

but when I went through the hub fork command and added my Github details, I noticed that when running git remote -v it listed

USER    [email protected]:USER/homebrew-cask.git (fetch)
USER    [email protected]:USER/homebrew-cask.git (push)
origin  https://github.com/caskroom/homebrew-cask (fetch)
origin  https://github.com/caskroom/homebrew-cask (push) 

instead of the usual

USER    https://github.com/USER/homebrew-cask (fetch)
USER    https://github.com/USER/homebrew-cask (push)
origin  https://github.com/caskroom/homebrew-cask (fetch)
origin  https://github.com/caskroom/homebrew-cask (push) 

and I could not push. I had to run git remote set-url USER https://github.com/USER/homebrew-cask to get things working.

I was just wondering if this is normal, or did I do something wrong in my initial setup?

cask-repair enforces HTTPS for remote?

I noticed that cask-repair explicitly creates the remote for the fork with HTTPS? Why's that?

Is there any chance to get SSH support? With 2FA enabled I find HTTPS is a nuisance to use.

error: the requested upstream branch 'antonakv/cask-repair_update-deadbeef' does not exist

Hi,

I have the same issue as in #26

$ cask-repair --help

This script requires 'hub' installed and configured.
If you have [Homebrew](http://brew.sh), you can install it with 'brew install hub'.
To configure it, run 'cd /usr/local/Homebrew && hub issue'. Your Github password will be required, but is never stored.
  
$ cd /usr/local/Homebrew && hub issue
github.com username: antonakv
github.com password for antonakv (never stored): 
   1594] Not all scripts installed to zsh/site-functions are completion scripts ( https://github.com/Homebrew/brew/issues/1594 )
   1593] Add --ask option to prompt for further action ( https://github.com/Homebrew/brew/pull/1593 )
   1592] formula: runtime deps of build deps aren't runtime ( https://github.com/Homebrew/brew/pull/1592 )
   1590] Fail if cask source already exists. ( https://github.com/Homebrew/brew/pull/1590 )
   1587] Incorrect selection of Xcode location ( https://github.com/Homebrew/brew/issues/1587 )
   1586] Cannot uninstall dependents unless the dependencies' formulae still exist ( https://github.com/Homebrew/brew/issues/1586 )
   1585] Crash in xquartz.rb: Error: undefined method `/' for nil:NilClass ( https://github.com/Homebrew/brew/issues/1585 )
   1566] Pruned 1 symbolic links from /usr/local - every day ( https://github.com/Homebrew/brew/issues/1566 )
   1556] Can't install on Sierra ( https://github.com/Homebrew/brew/issues/1556 )
   1555] revision bumped run-time dependencies are not protected ( https://github.com/Homebrew/brew/issues/1555 )
   1554] some build-time dependencies recorded as run-time dependencies ( https://github.com/Homebrew/brew/issues/1554 )
   1527] keg: update installed dependency resolution ( https://github.com/Homebrew/brew/pull/1527 )
   1526] Some tests are run multiple times ( https://github.com/Homebrew/brew/issues/1526 )
   1525] How should installed dependency resolution handle versions? ( https://github.com/Homebrew/brew/issues/1525 )
   1524] brew uninstall can have counter-intuitive (and frustrating) results ( https://github.com/Homebrew/brew/issues/1524 )
   1523] brew cask add upgrade/outdated/pin/unpin ( https://github.com/Homebrew/brew/pull/1523 )
   1471] Add --with-custom-python option to virtualenv formulæ ( https://github.com/Homebrew/brew/pull/1471 )
   1464] Use `launchctl` to get running processes by bundle ID. ( https://github.com/Homebrew/brew/pull/1464 )
   1432] metafiles: warn about missing metafiles  ( https://github.com/Homebrew/brew/pull/1432 )
   1408] Add :node special dependency ( https://github.com/Homebrew/brew/pull/1408 )
   1349] Merge Gemfiles. ( https://github.com/Homebrew/brew/pull/1349 )
   1343] Allow to install any spec ( https://github.com/Homebrew/brew/pull/1343 )
   1335] cask: activate GPG verification on install ( https://github.com/Homebrew/brew/pull/1335 )
   1314] [WIP] Refactor test suites. ( https://github.com/Homebrew/brew/pull/1314 )
   1297] Complain about HEP 6 violations. ( https://github.com/Homebrew/brew/pull/1297 )
   1292] Make stats from analytics available as a yearly report ( https://github.com/Homebrew/brew/issues/1292 )
   1247] minimum os requirement is not being inherited ( https://github.com/Homebrew/brew/issues/1247 )
   1237] migrate-formula-pr: new command ( https://github.com/Homebrew/brew/pull/1237 )
   1192] keg: create symlinks in opt for formula aliases ( https://github.com/Homebrew/brew/pull/1192 )
   1191] -L#{sysroot}/usr/lib isn't always removed by superenv with Xcode 8 ( https://github.com/Homebrew/brew/issues/1191 )
Homebrew anton$ cd "$(brew --repository)/Library/Taps/caskroom/homebrew-cask/Casks"
Casks anton$ 
Casks anton$ hub fork
Updating antonakv
remote: Counting objects: 74, done.
remote: Compressing objects: 100% (38/38), done.
remote: Total 74 (delta 55), reused 55 (delta 36), pack-reused 0
Unpacking objects: 100% (74/74), done.
From https://github.com/Caskroom/homebrew-cask
 * [new branch]      boom_uninstall -> antonakv/boom_uninstall
 * [new branch]      master         -> antonakv/master
new remote: antonakv
Casks anton$ outdated_cask='deadbeef'
Casks anton$ github_user='antonakv'
Casks anton$ cd "$(brew --repository)/Library/Taps/caskroom/homebrew-cask/Casks"
Casks anton$ cask-repair --pull origin --push $github_user $outdated_cask
-----------------------------------------------------------------------------------------------------------------------------------------------------------
cask 'deadbeef' do
  version '0.7.2'
  sha256 '8da871c4f8ab19515bb85119a85b32ed3917a8c01074afb8861a00debd3bb38e'

  url 'https://downloads.sourceforge.net/deadbeef/deadbeef-devel-osx-x86_64.zip'
  appcast 'https://sourceforge.net/projects/deadbeef/rss?path=/travis/osx/master',
          checkpoint: '34fb1506fb9797148a3191583ddd33c7279336876c6823a4c23e40431811e190'
  name 'DeaDBeeF'
  homepage 'http://deadbeef.sourceforge.net/'

  app 'deadbeef.app'
end
-----------------------------------------------------------------------------------------------------------------------------------------------------------
Type the new version (or leave blank to use the current one)
> 0.7.2
Paste the new URL (or leave blank to use the current one)
> 
==> Downloading external files for Cask ./deadbeef.rb
==> Downloading https://downloads.sourceforge.net/deadbeef/deadbeef-devel-osx-x86_64.zip
######################################################################## 100.0%
==> No checksum defined for Cask deadbeef, skipping verification
==> Success! Downloaded to -> /Users/anton/Library/Caches/Homebrew/Cask/deadbeef--0.7.2.zip
diff --git a/Casks/deadbeef.rb b/Casks/deadbeef.rb
index 6861b79..43d369f 100644
--- a/Casks/deadbeef.rb
+++ b/Casks/deadbeef.rb
@@ -1,10 +1,10 @@
 cask 'deadbeef' do
   version '0.7.2'
-  sha256 '8da871c4f8ab19515bb85119a85b32ed3917a8c01074afb8861a00debd3bb38e'
+  sha256 '7dc688cca32bf1ef2efbfb4f93c7464b1f935ad71e3d2e35fb06513a615bd7e8'
 
   url 'https://downloads.sourceforge.net/deadbeef/deadbeef-devel-osx-x86_64.zip'
   appcast 'https://sourceforge.net/projects/deadbeef/rss?path=/travis/osx/master',
-          checkpoint: '34fb1506fb9797148a3191583ddd33c7279336876c6823a4c23e40431811e190'
+          checkpoint: 'ed8178e68dd11ce0d03d31f8864e4eaa95cf45112764691f0b82793fcbd4dcb2'
   name 'DeaDBeeF'
   homepage 'http://deadbeef.sourceforge.net/'
 
-----------------------------------------------------------------------------------------------------------------------------------------------------------
Is everything correct? You can also make further manual edits (y/n/e) y
Submitting…
The authenticity of host 'github.com (192.30.253.112)' can't be established.
RSA key fingerprint is SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'github.com,192.30.253.112' (RSA) to the list of known hosts.
Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
error: the requested upstream branch 'antonakv/cask-repair_update-deadbeef' does not exist
hint: 
hint: If you are planning on basing your work on an upstream
hint: branch that already exists at the remote, you may need to
hint: run "git fetch" to retrieve it.
hint: 
hint: If you are planning to push out a new local branch that
hint: will track its remote counterpart, you may want to use
hint: "git push -u" to set the upstream config as you push.
Error creating pull request: Unprocessable Entity (HTTP 422)
Invalid value for "head"
Error creating pull request: Unprocessable Entity (HTTP 422)
Invalid value for "head"

There was an error submitting the pull request. Have you forked the repo and made sure the pull and push remotes exist?

How can I fix that ?
Please advice.

Can not update Cask for apple-events version 0.6

i try to update the apple-events to version 0.6 and i get this error

Submitting…
To https://github.com/muescha/homebrew-cask.git
 ! [remote rejected] cask-repair_update-apple-events -> cask-repair_update-apple-events (shallow update not allowed)
error: failed to push some refs to 'https://github.com/muescha/homebrew-cask.git'
error: the requested upstream branch 'muescha/cask-repair_update-apple-events' does not exist
hint: 
hint: If you are planning on basing your work on an upstream
hint: branch that already exists at the remote, you may need to
hint: run "git fetch" to retrieve it.
hint: 
hint: If you are planning to push out a new local branch that
hint: will track its remote counterpart, you may want to use
hint: "git push -u" to set the upstream config as you push.
Error creating pull request: Unprocessable Entity (HTTP 422)
Invalid value for "head"
Error creating pull request: Unprocessable Entity (HTTP 422)
Invalid value for "head"

There was an error submitting the pull request. Have you forked the repo and made sure the pull and push remotes exist?

PS: full log...

$ brew update
[...]
$ brew cask update
Already up-to-date.
$ brew cask search appleevent
==> Partial matches
apple-events
[23:18:57] muescha@Michaels-MBP:~/Work/github/TubeApp 
$ brew cask info apple-events
apple-events: 0.5.2
https://github.com/insidegui/AppleEvents
Not installed
From: https://github.com/caskroom/homebrew-cask/blob/master/Casks/apple-events.rb
==> Name
Apple Events
==> Artifacts
Apple Events.app (app)
$ brew install vitorgalvao/tiny-scripts/cask-repair
==> Tapping vitorgalvao/tiny-scripts
Cloning into '/usr/local/Homebrew/Library/Taps/vitorgalvao/homebrew-tiny-scripts'...
remote: Counting objects: 33, done.
remote: Compressing objects: 100% (31/31), done.
remote: Total 33 (delta 19), reused 6 (delta 2), pack-reused 0
Unpacking objects: 100% (33/33), done.
Checking connectivity... done.
Tapped 29 formulae (85 files, 45.4K)
==> Installing cask-repair from vitorgalvao/tiny-scripts
==> Installing dependencies for vitorgalvao/tiny-scripts/cask-repair: hub, hr
==> Installing vitorgalvao/tiny-scripts/cask-repair dependency: hub
==> Downloading https://homebrew.bintray.com/bottles/hub-2.2.9.el_capitan.bottle
######################################################################## 100,0%
==> Pouring hub-2.2.9.el_capitan.bottle.tar.gz
==> Caveats
Bash completion has been installed to:
  /usr/local/etc/bash_completion.d

zsh completion has been installed to:
  /usr/local/share/zsh/site-functions
==> Summary
🍺  /usr/local/Cellar/hub/2.2.9: 10 files, 9M
==> Installing vitorgalvao/tiny-scripts/cask-repair dependency: hr
==> Using the sandbox
==> Downloading https://github.com/LuRsT/hr/archive/1.2.tar.gz
==> Downloading from https://codeload.github.com/LuRsT/hr/tar.gz/1.2
######################################################################## 100,0%
🍺  /usr/local/Cellar/hr/1.2: 5 files, 6.5K, built in 9 seconds
==> Installing vitorgalvao/tiny-scripts/cask-repair
==> Cloning https://github.com/vitorgalvao/tiny-scripts.git
Cloning into '/Users/muescha/Library/Caches/Homebrew/cask-repair--git'...
remote: Counting objects: 27, done.
remote: Compressing objects: 100% (26/26), done.
remote: Total 27 (delta 3), reused 8 (delta 1), pack-reused 0
Unpacking objects: 100% (27/27), done.
Checking connectivity... done.
==> Checking out branch master
🍺  /usr/local/Cellar/cask-repair/0.27.1: 5 files, 19.7K, built in 2 seconds
[23:25:09] muescha@Michaels-MBP:~/Work/github/TubeApp 
$ cd "$(brew --repository)/Library/Taps/caskroom/homebrew-cask/Casks"
$ git config --local hub.protocol https
$ hub fork
github.com username: muescha    
github.com password for muescha (never stored): 
Updating muescha
From https://github.com/caskroom/homebrew-cask
 * [new branch]      master     -> muescha/master
new remote: muescha
$ outdated_cask='apple-events'
$ github_user='muescha'
$ cd "$(brew --repository)/Library/Taps/caskroom/homebrew-cask/Casks"
$ cask-repair --pull origin --push $github_user $outdated_cask
--------------------------------------------------------------------------------
cask 'apple-events' do
  version '0.5.2'
  sha256 '08aaf1476a33e4dc13b00f130855e75ec0d2a1e79ce864038534d852a5446ce9'

  url "https://github.com/insidegui/AppleEvents/releases/download/#{version}/AppleEvents_v#{version}.zip"
  appcast 'https://github.com/insidegui/AppleEvents/releases.atom',
          checkpoint: 'd7ca40878e8a8ed4a7d5423374d102004769ff9ac3fb67ff3d5bd2d44670ffff'
  name 'Apple Events'
  homepage 'https://github.com/insidegui/AppleEvents'

  auto_updates true

  app 'Apple Events.app'
end
--------------------------------------------------------------------------------
Type the new version (or leave blank to use the current one)
> 0.6
==> Downloading external files for Cask ./apple-events.rb
==> Downloading https://github.com/insidegui/AppleEvents/releases/download/0.6/A
######################################################################## 100,0%
==> No checksum defined for Cask apple-events, skipping verification
==> Success! Downloaded to -> /Users/muescha/Library/Caches/Homebrew/Cask/apple-
diff --git a/Casks/apple-events.rb b/Casks/apple-events.rb
index 3c3ec08..d84a429 100644
--- a/Casks/apple-events.rb
+++ b/Casks/apple-events.rb
@@ -1,10 +1,10 @@
 cask 'apple-events' do
-  version '0.5.2'
-  sha256 '08aaf1476a33e4dc13b00f130855e75ec0d2a1e79ce864038534d852a5446ce9'
+  version '0.6'
+  sha256 'd73b3544a6047790432cb9e4acdb40b651627a7666338ca5b5702958211e73cf'

   url "https://github.com/insidegui/AppleEvents/releases/download/#{version}/AppleEvents_v#{version}.zip"
   appcast 'https://github.com/insidegui/AppleEvents/releases.atom',
-          checkpoint: 'd7ca40878e8a8ed4a7d5423374d102004769ff9ac3fb67ff3d5bd2d44670ffff'
+          checkpoint: '60cca490eb5487e5ff698aa6ad10dc4e68eb10a41ff321133133afc5365b4706'
   name 'Apple Events'
   homepage 'https://github.com/insidegui/AppleEvents'

--------------------------------------------------------------------------------
Is everything correct? You can also make further manual edits (y/n/e) y
Submitting…
To https://github.com/muescha/homebrew-cask.git
 ! [remote rejected] cask-repair_update-apple-events -> cask-repair_update-apple-events (shallow update not allowed)
error: failed to push some refs to 'https://github.com/muescha/homebrew-cask.git'
error: the requested upstream branch 'muescha/cask-repair_update-apple-events' does not exist
hint: 
hint: If you are planning on basing your work on an upstream
hint: branch that already exists at the remote, you may need to
hint: run "git fetch" to retrieve it.
hint: 
hint: If you are planning to push out a new local branch that
hint: will track its remote counterpart, you may want to use
hint: "git push -u" to set the upstream config as you push.
Error creating pull request: Unprocessable Entity (HTTP 422)
Invalid value for "head"
Error creating pull request: Unprocessable Entity (HTTP 422)
Invalid value for "head"

There was an error submitting the pull request. Have you forked the repo and made sure the pull and push remotes exist?

$ git remote --verbose
muescha https://github.com/muescha/homebrew-cask.git (fetch)
muescha https://github.com/muescha/homebrew-cask.git (push)
origin  https://github.com/caskroom/homebrew-cask (fetch)
origin  https://github.com/caskroom/homebrew-cask (push)
$ 

Problem with comma after url

For example java-beta:

cask-repair java-beta
Type the new version (or leave blank to use current one, or use `s` to skip)
> 
Paste the new URL (or leave blank to use the current one)
> http://download.java.net/java/jdk8u152/archive/b02/binaries/jdk-8u152-ea-bin-b02-macosx-x86_64-27_mar_2017.dmg
Error: /usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cask_loader.rb:14: syntax error, unexpected ':', expecting keyword_end
      cookies: { 'oraclelicense' => 'accept-securebackup-cookie' }
              ^
Follow the instructions here:
  https://github.com/caskroom/homebrew-cask#reporting-bugs
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cask_loader.rb:9:in `instance_eval'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cask_loader.rb:9:in `load'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cask_loader.rb:41:in `load'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cask_loader.rb:128:in `load'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli/internal_stanza.rb:87:in `block in print_stanzas'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli/internal_stanza.rb:83:in `each'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli/internal_stanza.rb:83:in `print_stanzas'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli/internal_stanza.rb:64:in `run'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli.rb:115:in `run_command'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli.rb:158:in `process'
/usr/local/Homebrew/Library/Homebrew/cmd/cask.rb:8:in `cask'
/usr/local/Homebrew/Library/Homebrew/brew.rb:91:in `<main>'
Error: /usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cask_loader.rb:14: syntax error, unexpected ':', expecting keyword_end
      cookies: { 'oraclelicense' => 'accept-securebackup-cookie' }
              ^
Follow the instructions here:
  https://github.com/caskroom/homebrew-cask#reporting-bugs
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cask_loader.rb:9:in `instance_eval'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cask_loader.rb:9:in `load'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cask_loader.rb:41:in `load'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cask_loader.rb:128:in `load'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli/internal_stanza.rb:87:in `block in print_stanzas'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli/internal_stanza.rb:83:in `each'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli/internal_stanza.rb:83:in `print_stanzas'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli/internal_stanza.rb:64:in `run'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli.rb:115:in `run_command'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli.rb:158:in `process'
/usr/local/Homebrew/Library/Homebrew/cmd/cask.rb:8:in `cask'
/usr/local/Homebrew/Library/Homebrew/brew.rb:91:in `<main>'
==> Downloading external files for Cask ./java-beta.rb
Error: /usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cask_loader.rb:14: syntax error, unexpected ':', expecting keyword_end
      cookies: { 'oraclelicense' => 'accept-securebackup-cookie' }
              ^
Follow the instructions here:
  https://github.com/caskroom/homebrew-cask#reporting-bugs
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cask_loader.rb:9:in `instance_eval'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cask_loader.rb:9:in `load'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cask_loader.rb:41:in `load'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cask_loader.rb:128:in `load'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli/fetch.rb:11:in `block in run'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli/fetch.rb:9:in `each'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli/fetch.rb:9:in `run'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli.rb:115:in `run_command'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli.rb:158:in `process'
/usr/local/Homebrew/Library/Homebrew/cmd/cask.rb:8:in `cask'
/usr/local/Homebrew/Library/Homebrew/brew.rb:91:in `<main>'
shasum: ==> Downloading external files for Cask ./java-beta.rb: 
Error: /usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cask_loader.rb:14: syntax error, unexpected ':', expecting keyword_end
      cookies: { 'oraclelicense' => 'accept-securebackup-cookie' }
              ^
Follow the instructions here:
  https://github.com/caskroom/homebrew-cask#reporting-bugs
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cask_loader.rb:9:in `instance_eval'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cask_loader.rb:9:in `load'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cask_loader.rb:41:in `load'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cask_loader.rb:128:in `load'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli/internal_stanza.rb:87:in `block in print_stanzas'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli/internal_stanza.rb:83:in `each'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli/internal_stanza.rb:83:in `print_stanzas'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli/internal_stanza.rb:64:in `run'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli.rb:115:in `run_command'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli.rb:158:in `process'
/usr/local/Homebrew/Library/Homebrew/cmd/cask.rb:8:in `cask'
/usr/local/Homebrew/Library/Homebrew/brew.rb:91:in `<main>'
diff --git a/Casks/java-beta.rb b/Casks/java-beta.rb
index 3b8c2b6b9..1e0c3fae0 100644
--- a/Casks/java-beta.rb
+++ b/Casks/java-beta.rb
@@ -1,8 +1,8 @@
 cask 'java-beta' do
   version '1.8.0_152-b02'
-  sha256 'a770c642f807f5f7f5f06598c2caef71611ee37a4ade976fdfab7ab15bfa7a15'
+  sha256 ''
 
-  url 'http://download.java.net/java/jdk8u152/archive/b02/binaries/jdk-8u152-ea-bin-b02-macosx-x86_64-27_mar_2017.dmg',
+  url 'http://download.java.net/java/jdk8u152/archive/b02/binaries/jdk-8u152-ea-bin-b02-macosx-x86_64-27_mar_2017.dmg'
       cookies: { 'oraclelicense' => 'accept-securebackup-cookie' }
   name 'Java Standard Edition Development Kit'
   homepage 'https://jdk8.java.net/download.html'
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
• url is probably incorrect, as a non-200 (OK) HTTP response code was returned (000)
• == java-beta.rb ==
E:  6: 14: unexpected token tCOLON
(Using Ruby 2.1 parser; configure using TargetRubyVersion parameter, under AllCops)

1 file inspected, 1 offense detected
• 
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Is everything correct? ([y]es / [n]o / [e]dit) ^C
You aborted.

cask-repair: the requested upstream branch does not exists

After all steps listed here, cask-repair is not able to create pull request.

Script command:
cask-repair --pull origin --push MilusW yourkit-java-profiler

Script output:

Submitting…
error: the requested upstream branch 'MilusW' does not exist
hint: 
hint: If you are planning on basing your work on an upstream
hint: branch that already exists at the remote, you may need to
hint: run "git fetch" to retrieve it.
hint: 
hint: If you are planning to push out a new local branch that
hint: will track its remote counterpart, you may want to use
hint: "git push -u" to set the upstream config as you push.
Error creating pull request: Unprocessable Entity (HTTP 422)
Invalid value for "head"
Error creating pull request: Unprocessable Entity (HTTP 422)
Invalid value for "head"

git remote -v:

MilusW  [email protected]:MilusW/homebrew-cask.git (fetch)
MilusW  [email protected]:MilusW/homebrew-cask.git (push)
origin  https://github.com/caskroom/homebrew-cask (fetch)
origin  https://github.com/caskroom/homebrew-cask (push)

brew info cask-repair hub | grep -E '(cask-repair:|hub:)':

vitorgalvao/tiny-scripts/cask-repair: stable 0.24.1
hub: stable 2.2.3 (bottled), HEAD

I have done everything from #20, but it still doesn't work.

cask-repair fails to create a pull request

To start, #9, is still an issue. (TL;DR - Hotfix: git remote set-url <github_user> [email protected]:<github_user>/homebrew-cask.git)

hub issue creates a new remote to my fork set to https. Pulling from that fork (ie. cask-repair --pull origin --push JosephViolago adafruit-arduino) requires login (but no authentication code for MFA), and then fails. Changing that remote to ssh, fixes that problem.

But once I have access to push, I get walled off with this error:

Submitting…
On branch cask-repair_update-adafruit-arduino
nothing to commit, working directory clean
To [email protected]:JosephViolago/homebrew-cask.git
 ! [rejected]        cask-repair_update-adafruit-arduino -> cask-repair_update-adafruit-arduino (non-fast-forward)
error: failed to push some refs to '[email protected]:JosephViolago/homebrew-cask.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
Error creating pull request: Unprocessable Entity (HTTP 422)
Missing field: "head_sha"
Missing field: "base_sha"

Now this is an output after I've gotten my manually-produced PR accepted, so it is difficult for me to reproduce. But I think the interesting parts is how a PR is still being attempted even after some sort of failure in the prior command.

I'll try to reproduce and record that better.

cask-repair Unprocessable Entity (HTTP 422)

every time when I accept submit

Submitting…
Error creating pull request: Unprocessable Entity (HTTP 422)
Missing field: "head_sha"
Missing field: "base_sha"
No commits between master and cask-repair_update-torbrowser-de
Error creating pull request: Unprocessable Entity (HTTP 422)
Missing field: "head_sha"
Missing field: "base_sha"
No commits between master and cask-repair_update-torbrowser-de

full output: https://gist.github.com/yurikoles/9e527b651f3b7c0961e4761d7b3abad0

cask-repair: Tried to update wrong source.

Hi,

Take a look a this:

cask 'onyx' do
  if MacOS.version == :el_capitan
    version '3.1.8'
    sha256 '9d46d09346666a4dcecd0c92eb1bebd76c76f145744926ebda594831d45724ab'
  else
    version '3.2.5'
    sha256 '068b9d4df199727ecf750879b943efc9b5813aab318cca05f937be7f9a075d81'
  end

  url "https://www.titanium-software.fr/download/#{MacOS.version.to_s.delete('.')}/OnyX.dmg"
  appcast 'http://www.titanium-software.fr/en/release_onyx.html',
          checkpoint: 'dbf3a781dd00731b9d9e00d72580d1b32c2caefdac2b846b1540bf1d4d97cda2'
  name 'OnyX'
  homepage 'https://www.titanium-software.fr/en/onyx.html'

  depends_on macos: '>= :el_capitan'

  app 'OnyX.app'
end

Running your script:

diff --git a/Casks/onyx.rb b/Casks/onyx.rb
index 3d73c3b..3f805e8 100644
--- a/Casks/onyx.rb
+++ b/Casks/onyx.rb
@@ -3,13 +3,13 @@ cask 'onyx' do
     version '3.1.8'
     sha256 '9d46d09346666a4dcecd0c92eb1bebd76c76f145744926ebda594831d45724ab'
   else
-    version '3.2.5'
+    version '3.1.9'
     sha256 '068b9d4df199727ecf750879b943efc9b5813aab318cca05f937be7f9a075d81'
   end

   url "https://www.titanium-software.fr/download/#{MacOS.version.to_s.delete('.')}/OnyX.dmg"
   appcast 'http://www.titanium-software.fr/en/release_onyx.html',
-          checkpoint: 'dbf3a781dd00731b9d9e00d72580d1b32c2caefdac2b846b1540bf1d4d97cda2'
+          checkpoint: 'c16bcf20fc23cb0da4e45e8b1eef97f8fb2315c3860c672c2d397907e6835e60'
   name 'OnyX'
   homepage 'https://www.titanium-software.fr/en/onyx.html'

Issue: It updates the wrong section. Anything to do about this sort of stuff?

Thank you for your script.

A pull request already exists for ....

after i submitted a change for the version 0.6 i see there is a version 0.7 released just minutes before.

i run the cask repair script again. i run into an error.

but my previous pull request gets updated... i only had to change the title of the PR

Homebrew/homebrew-cask#26083

 cask 'apple-events' do
-  version '0.5.2'
-  sha256 '08aaf1476a33e4dc13b00f130855e75ec0d2a1e79ce864038534d852a5446ce9'
+  version '0.7'
+  sha256 '02348341c90ac1810e326ee936854254fe1f29b50fac751266bd6934eba6b206'

-  url "https://github.com/insidegui/AppleEvents/releases/download/#{version}/AppleEvents_v#{version}.zip"
+  url "https://github.com/insidegui/AppleEvents/releases/download/#{version}/AppleEvents_v#{version}_r.zip"
   appcast 'https://github.com/insidegui/AppleEvents/releases.atom',
-          checkpoint: 'd7ca40878e8a8ed4a7d5423374d102004769ff9ac3fb67ff3d5bd2d44670ffff'
+          checkpoint: '751efe3487fe195362e1967f84e919a33138d3df47bf738c394bc0fad68a0a34'
   name 'Apple Events'
   homepage 'https://github.com/insidegui/AppleEvents'

--------------------------------------------------------------------------------
Is everything correct? You can also make further manual edits (y/n/e) y
Submitting…
Error creating pull request: Unprocessable Entity (HTTP 422)
A pull request already exists for muescha:cask-repair_update-apple-events.
Error creating pull request: Unprocessable Entity (HTTP 422)
A pull request already exists for muescha:cask-repair_update-apple-events.

There was an error submitting the pull request. Have you forked the repo and made sure the pull and push remotes exist?

[02:39:26] muescha@Michaels-MBP:/usr/local/Homebrew/Library/Taps/caskroom/homebrew-cask/Casks 

cask-repair: force push if branch already exists

Now there is a long multi-line comment output from git that branch can't fast-forward.
It may be more useful to check that remote branch with same name already exists with some options to choose what to do next.

cask-repair: allow a local install prior to commit

Heya,

Forgive me if there is an obvious technique that I'm missing here. Let's say I have v1 of a cask and I know there's v2 available. As a non-core cask room dev, I can run the script, submit a PR and wait for it to be merged. It would be nice if I could install the new version locally before the PR gets merged, but the script currently deletes the local branch prior to finishing.

In implementing this, I'm not sure which of the following would work best:

  1. waiting prior to deletion for the user to install (or whatever) in a second shell
  2. a --keep-local-branch flag
  3. a --install flag

cask-repair not recognizing configured `hub`

If you configure you environment with a GITHUB_TOKEN environment variable, then hub will use it instead (it appears...since I'm able to run hub issues just fine - it doesn't even ask me to log in or anything)

However, the first check of cask-repair requires that a token be stored in ~/.config/hub. I would suggest that if the environment variable GITHUB_TOKEN is set, that the script also treats hub as "configured".

cask-repair fails when prompting for password

When using an https based remote, something is getting in the way of capturing the username/password for github.

$ cask-repair --pull origin --push jbeda consul
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
cask 'consul' do
  version '0.6.1'
  sha256 '358654900772b3477497f4a5b5a841f2763dc3062bf29212606a97f5a7a675f3'

  # hashicorp.com is the official download host per the vendor homepage
  url "https://releases.hashicorp.com/consul/#{version}/consul_#{version}_darwin_amd64.zip"
  name 'Consul'
  homepage 'https://www.consul.io/'
  license :mpl

  binary 'consul'
end
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Type the new version (or leave blank to abort)
> 0.6.0
==> Downloading external files for Cask ./consul.rb
==> Downloading https://releases.hashicorp.com/consul/0.6.0/consul_0.6.0_darwin_amd64.zip
######################################################################## 100.0%
==> No checksum defined for Cask consul, skipping verification
==> Success! Downloaded to -> /Library/Caches/Homebrew/consul-0.6.0.zip
audit for consul: passed
diff --git a/Casks/consul.rb b/Casks/consul.rb
index c67b778..a4dc885 100644
--- a/Casks/consul.rb
+++ b/Casks/consul.rb
@@ -1,6 +1,6 @@
 cask 'consul' do
-  version '0.6.1'
-  sha256 '358654900772b3477497f4a5b5a841f2763dc3062bf29212606a97f5a7a675f3'
+  version '0.6.0'
+  sha256 '29ddff01368458048731afa586cec5426c8033a914b43fc83d6442e0a522c114'

   # hashicorp.com is the official download host per the vendor homepage
   url "https://releases.hashicorp.com/consul/#{version}/consul_#{version}_darwin_amd64.zip"
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Is everything correct? You can also make further manual edits (y/n/e) y
Username for 'https://github.com': Password for 'https://github.com':
remote: Anonymous access to jbeda/homebrew-cask.git denied.
fatal: Authentication failed for 'https://github.com/jbeda/homebrew-cask.git/'
Error creating pull request: Unprocessable Entity (HTTP 422)
Missing field: "head_sha"
Missing field: "base_sha"
No commits between master and update-consul

Submitted

I'm not sure what is going on here but I suspect that it is the --quiet flag to the git push.

Also, this bash script continues to blunder on when errors are encountered. I'd suggest you set the following options (for pretty much any substantial bash script) to reduce unexpected behavior:

set -o errexit
set -o nounset
set -o pipefail

If there is still clean up to be done even in these error cases, consider using a trap on ERR or EXIT.

cask-repair: uses wrong `shasum`

Looks like cask-repair has been giving me the wrong shasum more often then not on Cask update. See Homebrew/homebrew-cask#16342 (and all the earlier navicat PRs). Not sure if it's a problem on my end, but I suspect it could be. Didn't have any issues before today, though.

On latest revision of script

 [.../homebrew-cask/Casks] > brew info cask-repair
vitorgalvao/tinyscripts/cask-repair: stable 0.12.5
Script to quickly repair outdated/broken Casks from homebrew-cask
https://github.com/vitorgalvao/tiny-scripts
/usr/local/Cellar/cask-repair/0.12.5 (4 files, 10.7K) *
  Built from source
From: https://github.com/vitorgalvao/homebrew-tinyscripts/blob/master/cask-repair.rb
==> Dependencies
Required: hub ✔

My .curlrc:

user-agent = "Mozilla/5.0 (Windows NT 6.1; rv:31.0) Gecko/20100101 Firefox/31.0"
referer = ";auto"
connect-timeout = 10
progress-bar
show-error
remote-time
ipv4

Possibly useful (or useless) troubleshooting information:

brew doctor:

[~] > brew doctor
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry and just ignore them. Thanks!

Warning: You have a curlrc file
If you have trouble downloading packages with Homebrew, then maybe this
is the problem? If the following command doesn't work, then try removing
your curlrc:
  curl https://github.com

Warning: Homebrew's sbin was not found in your PATH but you have installed
formulae that put executables in /usr/local/sbin.
Consider setting the PATH for example like so
    echo 'export PATH="/usr/local/sbin:$PATH"' >> ~/.bash_profile

brew cask doctor::

[~] > brew cask doctor
==> OS X Release:
10.11
==> OS X Release with Patchlevel:
10.11.2
==> Hardware Architecture:
intel-64
==> Ruby Version:
2.0.0-p645
==> Ruby Path:
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby
==> Homebrew Version:
Homebrew 0.9.5 (git revision 077e0d; last commit 2016-01-04)
==> Homebrew Executable Path:
/usr/local/bin/brew
==> Homebrew Cellar Path:
/usr/local/Cellar
==> Homebrew Repository Path:
/usr/local
==> Homebrew Origin:
https://github.com/Homebrew/homebrew
==> Homebrew-cask Version:
0.60.0 (git revision cb343e; last commit 2 hours ago)
==> Homebrew-cask Install Location:
<NONE>
==> Homebrew-cask Staging Location:
/opt/homebrew-cask/Caskroom
==> Homebrew-cask Cached Downloads:
/Library/Caches/Homebrew
/Library/Caches/Homebrew/Casks
0 files
0.00 megs
==> Homebrew-cask Default Tap Path:
/usr/local/Library/Taps/caskroom/homebrew-cask
==> Homebrew-cask Alternate Cask Taps:
/usr/local/Library/Taps/caskroom/homebrew-fonts
/usr/local/Library/Taps/caskroom/homebrew-unofficial
/usr/local/Library/Taps/caskroom/homebrew-versions
==> Homebrew-cask Default Tap Cask Count:
2937
==> Contents of $LOAD_PATH:
/usr/local/Library/Taps/caskroom/homebrew-cask/lib
/usr/local/Library/Homebrew
/Library/Ruby/Site/2.0.0
/Library/Ruby/Site/2.0.0/x86_64-darwin15
/Library/Ruby/Site/2.0.0/universal-darwin15
/Library/Ruby/Site
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/vendor_ruby/2.0.0
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/vendor_ruby/2.0.0/x86_64-darwin15
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/vendor_ruby/2.0.0/universal-darwin15
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/vendor_ruby
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/x86_64-darwin15
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/universal-darwin15
==> Contents of $RUBYLIB Environment Variable:
<NONE>
==> Contents of $RUBYOPT Environment Variable:
<NONE>
==> Contents of $RUBYPATH Environment Variable:
<NONE>
==> Contents of $RBENV_VERSION Environment Variable:
<NONE>
==> Contents of $CHRUBY_VERSION Environment Variable:
<NONE>
==> Contents of $GEM_HOME Environment Variable:
<NONE>
==> Contents of $GEM_PATH Environment Variable:
<NONE>
==> Contents of $BUNDLE_PATH Environment Variable:
<NONE>
==> Contents of $PATH Environment Variable:
PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/local/Library/Taps/caskroom/homebrew-cask/cmd:/usr/local/Library/ENV/scm"
==> Contents of $SHELL Environment Variable:
SHELL="/usr/local/bin/bash"
==> Contents of Locale Environment Variables:
LANG="en_US.UTF-8"
==> Running As Privileged User:
No

Other:

[~] > shasum --version
5.84

[~] > which curl
/usr/bin/curl

[~] > curl --version
curl 7.43.0 (x86_64-apple-darwin15.0) libcurl/7.43.0 SecureTransport zlib/1.2.5
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp smb smbs smtp smtps telnet tftp 
Features: AsynchDNS IPv6 Largefile GSS-API Kerberos SPNEGO NTLM NTLM_WB SSL libz UnixSockets

# curl is also installed via brew, but not linked
 [/usr/local/opt/curl/bin] > ./curl --version
curl 7.46.0 (x86_64-apple-darwin15.0.0) libcurl/7.46.0 SecureTransport zlib/1.2.5
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp smb smbs smtp smtps telnet tftp 
Features: IPv6 Largefile NTLM NTLM_WB SSL libz UnixSockets 

failed pushing the pull request using cask-repair

after using "cask-repair nylas-mail" everything works right until the end where i get the following message

Aborted: 204 commits are not yet pushed to OranShuster/cask-repair_update-nylas-mail (use -fto force submit a pull request anyway) Aborted: 204 commits are not yet pushed to OranShuster/cask-repair_update-nylas-mail (use-f` to force submit a pull request anyway)

There was an error submitting the pull request. Please open a bug report on the repo for this script.`

My guess is that the revamped cask-repair might not like using already existing forks from the old cask-repair

cask-repair not automatically calculating appcast checkpoints

To save time, when adding a new appcast, I leave the checkpoint field blank, with only a pair of single quotes.

checkpoint: ''

Usually, cask-repair will automatically calculate the checkpoint hash, but occasionally it will not. I am not entirely sure why, and it seems to be random chance (but I know this is unlikely to happen, as scripts do not have a mind of their own). I may be making unfounded correlations, but the issue seems to happen whenever I am editing a cask with version :latest and/or sha256 :no_check.

I don't know if there is a link, but that is all I can think of. Let me know if further information is required to resolve the issue.

cask-repair fails on git authentification

cask-repair -e -v "1.1.1" dotnet
Updating taps… Already up-to-date.
cask 'dotnet' do
  version '1.0.0-preview2-1-003177,1.1.0'
  sha256 'be009582107b6eb58196a1e417e02c11d7da182669cd47a4c2a42f512e112fea'

  url "https://download.microsoft.com/download/1/4/1/141760B3-805B-4583-B17C-8C5BC5A876AB/Installers/dotnet-dev-osx-x64.#{version.before_comma}.pkg"
  name '.Net Core'
  homepage 'https://www.microsoft.com/net/core#macos'

  depends_on formula: 'openssl'

  pkg "dotnet-dev-osx-x64.#{version.before_comma}.pkg"
  postflight do
    dotnet_core = "/usr/local/share/dotnet/shared/Microsoft.NETCore.App/#{version.after_comma}"
    system_command '/usr/bin/install_name_tool',
                   args: [
                           "#{dotnet_core}/System.Security.Cryptography.Native.OpenSsl.dylib",
                           '-add_rpath', "#{HOMEBREW_PREFIX}/opt/openssl/lib"
                         ],
                   sudo: true
    system_command '/usr/bin/install_name_tool',
                   args: [
                           "#{dotnet_core}/System.Net.Http.Native.dylib",
                           '-change', '/usr/lib/libcurl.4.dylib',
                           "#{HOMEBREW_PREFIX}/opt/curl/lib/libcurl.4.dylib"
                         ],
                   sudo: true
  end

  uninstall pkgutil: 'com.microsoft.dotnet.*',
            delete:  '/etc/paths.d/dotnet'

  zap delete: '~/.nuget'
end

Opening cask in default editor. If it is a GUI editor, you will need to completely quit it (⌘Q) before the script can continue.
==> Downloading external files for Cask ./dotnet.rb
==> Downloading https://download.microsoft.com/download/8/F/9/8F9659B9-E628-4D1A-B6BF-C3004C8C954B/dotnet-1.1.1-sdk-osx-x64.pkg
######################################################################## 100.0%
==> No checksum defined for Cask dotnet, skipping verification
==> Success! Downloaded to -> /Users/dzmtrmartavoi/Library/Caches/Homebrew/Cask/dotnet--1.1.1.pkg
diff --git a/Casks/dotnet.rb b/Casks/dotnet.rb
index 2b9a55e..7ae7882 100644
--- a/Casks/dotnet.rb
+++ b/Casks/dotnet.rb
@@ -1,14 +1,14 @@
 cask 'dotnet' do
-  version '1.0.0-preview2-1-003177,1.1.0'
-  sha256 'be009582107b6eb58196a1e417e02c11d7da182669cd47a4c2a42f512e112fea'
+  version '1.1.1'
+  sha256 '5b432bc4cf63ea63e8c28a089747feb8a10364e91dae734ca69942ea14188c81'
 
-  url "https://download.microsoft.com/download/1/4/1/141760B3-805B-4583-B17C-8C5BC5A876AB/Installers/dotnet-dev-osx-x64.#{version.before_comma}.pkg"
+  url "https://download.microsoft.com/download/8/F/9/8F9659B9-E628-4D1A-B6BF-C3004C8C954B/dotnet-#{version}-sdk-osx-x64.pkg"
   name '.Net Core'
   homepage 'https://www.microsoft.com/net/core#macos'
 
   depends_on formula: 'openssl'
 
-  pkg "dotnet-dev-osx-x64.#{version.before_comma}.pkg"
+  pkg "dotnet-#{version}-sdk-osx-x64.pkg"

• url is probably incorrect, as a non-200 (OK) HTTP response code was returned (404)

Is everything correct? ([y]es / [n]o / [e]dit) y
Submitting…
Username for 'https://github.com': martavoi
Password for 'https://[email protected]': 
remote: Invalid username or password.
fatal: Authentication failed for 'https://github.com/martavoi/homebrew-cask/'
Error creating pull request: Unprocessable Entity (HTTP 422)
Invalid value for "head"
Error creating pull request: Unprocessable Entity (HTTP 422)
Invalid value for "head"

There was an error submitting the pull request. Please open a bug report on the repo for this script.

cask-repair: cannot submit

Hello vitorgalvao, I am experiencing a strange issue with cask-repair that I cannot resolve - when I get to the stage where the script asks

Is everything correct? You can also make further manual edits (y/n/e)

and I enter y, it then repeats the question after outputting the following line:

• ==> Installing or updating 'rubocop-cask' gem

Entering y a second time prints it twice:

• ==> Installing or updating 'rubocop-cask' gem
• ==> Installing or updating 'rubocop-cask' gem

then repeats the line

Is everything correct? You can also make further manual edits (y/n/e)

Any suggestions?

use the appcast xml

the repair script should use the appcast xml or allow to input a new appcast.xml

cask-repair: Cannot update Casks with language stanza

It seems that cask-repair is not able to handle Casks with the language stanza.

For example, when attempting to update the thunderbird Cask to version 45.4.0 using the command cask-repair -v 45.4.0 -l origin -p miccal thunderbird, the following output is obtained:

==> Downloading external files for Cask ./thunderbird.rb
==> Downloading https://ftp.mozilla.org/pub/thunderbird/releases/45.4.0/mac/en-US/Thunderbird%2045.4.0.dmg
######################################################################## 100.0%
==> Verifying checksum for Cask thunderbird
==> Note: running "brew update" may fix sha256 checksum errors
Error: sha256 mismatch
Expected: d00599ab893f73cb74eafe58fae6135a5fd398b73d91822d5094831042af8061
Actual: ebba2f27fcb5f455ea2bea349ac884024d009f9e283f6205fc8a4610640988dc
File: /Users/miccal/Library/Caches/Homebrew/Cask/thunderbird--45.4.0.dmg
To retry an incomplete download, remove the file above.
shasum: ==> Note: running "brew update" may fix sha256 checksum errors: 
diff --git a/Casks/thunderbird.rb b/Casks/thunderbird.rb
index db38fad..7f44cf5 100644
--- a/Casks/thunderbird.rb
+++ b/Casks/thunderbird.rb
@@ -1,5 +1,5 @@
 cask 'thunderbird' do
-  version '45.3.0'
+  version '45.4.0'
 
   language 'de' do
     sha256 'f4daf70019bee14db81dd286fca77e6cd22f13682fd6bd65242fe52c22f0b75d'
@@ -52,7 +52,7 @@ cask 'thunderbird' do
   end
 
   language 'zh' do
-    sha256 '1e426a8df0ff6ef185eea63814517f81c24be717357b4e2b648fd50000755ee2'
+    sha256 ''
     'zh-CN'
   end
 
----------------------------------------------------------------
• ==> Auditing language: 'de'
audit for thunderbird: passed
==> Auditing language: 'en'
audit for thunderbird: passed
==> Auditing language: 'fr'
audit for thunderbird: passed
==> Auditing language: 'gl'
audit for thunderbird: passed
==> Auditing language: 'it'
audit for thunderbird: passed
==> Auditing language: 'ja'
audit for thunderbird: passed
==> Auditing language: 'nl'
audit for thunderbird: passed
==> Auditing language: 'pt'
audit for thunderbird: passed
==> Auditing language: 'ru'
audit for thunderbird: passed
==> Auditing language: 'uk'
audit for thunderbird: passed
==> Auditing language: 'zh'
audit for thunderbird: failed
 - sha256 string must be of 64 hexadecimal characters
----------------------------------------------------------------

If I then update the zh language sha256 manually and re-download, the script outputs a similar error for the next language up the list, namely uk.

I understand that there are only a few Casks using the language stanza (only 13 I believe), so I think that either:

  1. Update cask-repair to handle these cases (which I am happy to help with);
  2. Provide instructions in the Homebrew Cask docs to explain how to best update these Casks (which I am also happy to help with);
  3. I am doing something wrong (quite possible!).

HTTP Error 422 (using cask-repair)

I've started having this HTTP 422 error after setting up 2FA on my GitHub account. I noticed that something similar has been occurring recently and was supposed to have been fixed with this commit: #62

Here's the error message I get from cask repair:

Is everything correct? ([y]es / [n]o / [e]dit) y
Submitting…
Username for 'https://github.com': giannitm
Password for 'https://[email protected]':
remote: Invalid username or password.
fatal: Authentication failed for 'https://github.com/giannitm/homebrew-drivers/'
Error creating pull request: Unprocessable Entity (HTTP 422)
Invalid value for "head"
Error creating pull request: Unprocessable Entity (HTTP 422)
Invalid value for "head"

There was an error submitting the pull request. Please open a bug report on the repo for this script.

Please support 'subl -w' as editor.

It's just as simple as it stands, with EDITOR set to subl -w cask-repair falls back to Xcode. With output:

/usr/local/bin/cask-repair: line 355: subl -w: command not found

For those curious: -w or --wait: Wait for the files to be closed before returning. As its stand in Official Doc. This switch is very useful for git and others, please don't force us to change it.

cask-repair - fatal: remote part of refspec is not a valid name

Since the latest update (0.34.6) cask-repair -d errors.

cask-repair -d
From https://github.com/commitay/homebrew-cask
   cc421b977..6e11b990c  master     -> cask-repair/master
fatal: remote part of refspec is not a valid name in :cask-repair_update-whatroute
From https://github.com/commitay/homebrew-versions
   58fbe823e..f7a17a34b  master     -> cask-repair/master
cask-repair -d whatroute
fatal: remote part of refspec is not a valid name in :cask-repair_update-whatroute

Deleting the branch on github.com then running cask-repair -d succeeds.

cask-repair -d
From https://github.com/commitay/homebrew-cask
 - [deleted]             (none)     -> cask-repair/cask-repair_update-whatroute
brew info cask-repair
vitorgalvao/tiny-scripts/cask-repair: stable 0.34.6

Use $EDITOR to edit cask?

What do you think about using $EDITOR to edit the cask file?
Or any other way to override open -W?

EDITOR="open -W" cask-repair could still be used to get the same behavior.

`cask-repair`: Do not redownload file if identical version

Trying out the outdated appcast scripts, there's a bunch of Casks that have an updated appcast, but not a version bump, for one reason or another.

If the same version is given, cask-repair should only download/update the appcast checkpoint.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.