-
Notifications
You must be signed in to change notification settings - Fork 36
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
(BUG) Task sends a POST request for EACH file being uploaded (not just 1) #18
Comments
I encounted the same bug. |
I'm pretty sure this isn't actually a bug, and your PR will effectively break some features of this tool(although I'm not sure anyone uses these features) I'm working on setting up a new codebase and happened across this post, so decided to test this out while I was poking around in the code. The foreach function that contains the POST request doesn't run a for each on the FILES, but the.. mappings? if you look, it's doing a filter and then a map on the for each's iteration variable's .src property, which is apparently a list of the actual file paths that have been requested to be uploaded. I'm guessing this means you could, with some creative settings(google "grunt this.files" for more info on how the files array works) have this plugin upload a combined set of files from two different directories. Either way, it seems like it's working the way it's supposed to, it's just that grunt is kinda complicated, apparently. I'm guessing you have something weird going on with your config. do you have multiple deploy targets setup maybe? Can you post your gruntfile so we can see if there's anything going on there? |
I also encounter missing file problem. But I noticed that the Gruntfile I copied from is filled with complicated settings in screeps.dist session. This Gruntfile is in the readme file of grunt-screeps repo. I think the problem is cause by screeps.dist.files |
I was getting inconsistent behavior with the grunt-screeps module where sometimes, some of the files in my dist/ folder were not being uploaded. The behavior was inconsistent however. Sometimes all of my files would be uploaded, sometimes a few would be cut off.
It looks like the issue is that there is a POST request being sent with all of the files, for EACH file found. Essentially it is just an indentation issue where the post request construction and execution should not be inside of the forEach(file) function.
I'm happy to submit a PR for this bug.
The text was updated successfully, but these errors were encountered: