Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows-specific issues? #25

Open
Dylan-Chapman opened this issue Jun 1, 2019 · 5 comments
Open

Windows-specific issues? #25

Dylan-Chapman opened this issue Jun 1, 2019 · 5 comments

Comments

@Dylan-Chapman
Copy link

When I was setting this up on my Windows (localhost), I ran into a couple of problems:

  1. I had to add MySQL to my PATH so that the mysqldump command would work. Maybe this should be stated on the README? It wasn't immediately obvious to me, at least.

  2. The "2>/dev/null" at the end of the mysqldump call gives the output "The system cannot find the file specified" and results in an empty snipe_snapshot.sql file. Removing it fixes the error and the sql file is then populated.

@BrandonSurowiec
Copy link
Contributor

BrandonSurowiec commented Jun 19, 2019

I have the same exact issues on Windows 7, running Laravel Homestead for my sites locally. (This was a Laravel 5.8.23 project.)

@BrandonSurowiec
Copy link
Contributor

BrandonSurowiec commented Jun 19, 2019

Looks like the laravel/framework repo does some detecting of whether it is windows or not when choosing to append /dev/null:

https://github.com/laravel/framework/search?q=%2Fdev%2Fnull&unscoped_q=%2Fdev%2Fnull

Seems like doing the null output suppresses the following errors on Windows:

  • 'mysqldump' is not recognized as an internal or external command, operable program or batch file.
  • 'mysql' is not recognized as an internal or external command, operable program or batch file.

So if on a Windows machine, the backup is not going to run through Homestead but your local machine. Notes about installing the MySQL 8 server on Windows to check the availability of mysql -v would be good.

@drfraker
Copy link
Owner

I think the latest code will resolve these issues. Can you confirm?

@royfandi
Copy link

Hi!
I found some problems running Snipe Migrations:

  • On Windows the mysqldump and mysql command didn't work
  • The timeSum and storedTimeSum always was different. It was comparing with a "!==" a number (someting like 123456789.0) with a string ("123456789").

I tried to fix them on the following Pull Request:
#34

I couldn't check if it's working with GNU/Linux or Mac OS

@royfandi
Copy link

Today I could make a new test and the fixes are also working on GNU/Linux (using Docker)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants