humbug / phar-updater

A thing to make PHAR self-updates easy and secure
BSD 3-Clause "New" or "Revised" License
368 stars 27 forks source link

Setting a backup path will only set if it is a directory, but it is used as a file path in backupPhar() #2

Closed frak closed 9 years ago

frak commented 9 years ago

When you try to setup a different backup path using the documented setBackupPath() it goes to great lengths to ensure it is a directory. However, if you try to update the phar it is assumed in getBackupPharFile() that the backup path is actually to a file. When you then try and run the command it fails on line 364 of Updater.php because you cannot copy a file to a directory in that way.

padraic commented 9 years ago

This is true. I just wrapped up some Humbug work (new phar build). I'll be back on phar-updater to firm up the rollback and Github Releases support tomorrow. So this will get fixed then.

Thanks for trying it out though! Hopefully I can put out a stable first release shortly.

frak commented 9 years ago

Thanks for writing such a handy tool - I look forward to the fix :o)