-
-
Notifications
You must be signed in to change notification settings - Fork 65
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 Compatibility: [ERROR] Command failed #17
Comments
Thanks for opening the issue, I‘ll push a branch some time soon and then would like to ask you to test if it works for you. |
OK. Thanks for info. |
I require your help to get the tool working on windows.
I expect a new error to occur. I'll try to fix one after the other until it works on windows too. Please be patient with me until it works. I appreciate your help. |
I checked the new branch. Still the same issue :
|
I see in file system.cljs
On my machine I am using GIT Bash (mingw64). Maybe different platform is used here? Any chance to add some debug here? |
According to the documentation You can see the value on your host by running the following command in your teminal
|
Got info from third party using Win10:
|
Yes. It looks the same on my machine. Any chance to get not minified cache-clean.js? I tried to build it on WIN without success. |
I've pushed an update to the Could you please do me a favor and update the branch again?
Please also run I can look into creating an un-minified build, but right now I don't have the time. |
OK. There is still the same problem. I had some time to make some debug. So... problem is not directly with path but how the php is processed from the windows cmd.exe. cmd.exe is run when you call On windows this one will not work : After changing the command and running Problem is when I ran In this case I suppose that you have to change slightly how the commands are run on windows. I would like to help more but closure is just out of my scope 😄 |
Thanks for the input! |
Okay, so I threw away the slash-to-backslash in file system paths conversion code, and instead made command line arguments to |
👍 it works almost perfect but.. still problem with --watch. Below the command
and error I am receiving |
Thanks for trying that out. Interesting. |
After a bit of googling it seems like it might be the
|
I've got this error then : This command works fine : Is there a need for \ or ^? |
Well, that’s what I’m trying to figure out. |
As I said in my last comment. It works fine without "" and I see list of directories in output. |
Oh, I didn't see that part, sorry. Thanks for your answer, I'll remove the quoting of the |
New build available on the |
OK. Cleaning speciific type of cache is working fine. Now I am testing "watch" action. For now I few times this kind of issue
After checking the path file was deleted but watcher was stopped and I had to run it again. I will do more tests next week and probably be back in case of any additional issues. |
Cool, one step further towards supporting windows 👍 |
@rafal-kos Any news on this topic by chance? I could wrap the unlink in a check to see if the file still exists. |
On windows the watcher throws exceptions about unlinking non-existent files. This might fix it... See #17 (comment)
I added regexes that match file paths with backslashes instead of regular slashes, added a check if a file exists before unlinking it, and merged the result into master and published it as release |
Sorry for late response but I didn't had time to check it. I have installed latest version from master branch. No error about missing file but I suppose it doesn't work correctly. Example output of command run with options "-w -vv":
After change in ui component or menu file I see info about processing but cache is not cleared. For example I am changing title in menu.xml. I see "processing" output but no info about clearing of cache. |
Thanks for trying out the new version and giving an update @rafal-kos! Thanks for your help. |
Update to the
Then check the release matches this:
If that is true, please run the command with the Then edit a Again, thank you for your help, I appreciate you doing that. |
Still the same :( First I am changing the ui_component XML file. Output :
Then some changes in di.xml is done. Output :
I don't see any change on form after reloading the page. |
@rafal-kos Thanks again for your help and your patience. The paths still contain forward slashes. I'll focus next on making them consistent - then the regex to fingerprint the file names should work more reliable. |
I've updated the win-compatibility branch accordingly. For reference, to install the current version of the branch, please use:
@rafal-kos Can you please try it when you get a chance and let me know if there is some progress? Thank you! |
The cache-clean.js utility seems to now work on windows (since release 0.0.37), at least under some circumstances. It would be great if I could get confirmation from others using a windows based development environment! |
I'm back to this topic. I have installed latest version. Still some issues. For example I have made some changes in ui component xml (artist_listing.xml). In output I see this :
but after reload I still see old content. In var/cache/mage--a/mage---608_UI_COMPONENT_CONFIGURATION_DATA_ARTIST_LISTING file is still existing. Also changes in etc/di.xml or etc/adminhtml/system.xml are not reloading the cache. Nothing in output. |
Hi @rafal-kos, I'm happy you are back on this topic, welcome back! |
@Vinai
In |
No, you are right - no cache configuration in |
Okay, next question. Can you please let me know what the |
Example output :
This path |
It does indeed. There is at least one bug in there that’s already fixed. |
Hello,
I am trying to run the tool on windows Git Bash :
vendor/bin/cache-clean.js config full_page
but in result I have this error :
[ERROR] Command failed: php -r 'echo json_encode((require "D:\projects\example\magento/app/etc/env.php") ?? []);'
Looks like there a problem with slash. When I run this command
php -r 'echo json_encode((require "D:/projects/example/magento/app/etc/env.php") ?? []);'
I am getting correct results.
Is it possible to get some fix for hat? Thanks in advance.
The text was updated successfully, but these errors were encountered: