Open thanatos opened 7 years ago
@thanatos
The native editor also fails when you add same file names. Without errors.
As far as I know, Drive API for Script Files usually returns not 200OK
while an error.
I think we could create some more checks and little by little start adding more advanced ones. From what I can tell the upload command knows little about the reasons of why it the fails but by adding those kinds of pre-checks we could pinpoint it a little better. Or maybe to not delay the push, run then only after the fail if they take too long. What do you guys think?
First, Apps Script appears to not allow two files differing only in
.gs
and .html
extensions. The Apps Script UI itself handles this really poorly: if you attempt to create aFoo.html
, and you already have aFoo.gs
, the request to haveFoo.html
created will silently fail, with no error messages.gapps upload
also fails if you try to upload both aFoo.js
andFoo.html
; I'm okay lumping this in with all the other "gapps
will fail if you do anything unusual" cases that exist. However, if you attempt to upload only aFoo.html
file (noFoo.js
), butFoo.gs
exists in Drive/server side, the request will fail.Does
gapps upload
remove files prior to attempting to add news ones? (Is this even how this operation works? Looking at the docs, it wasn't particularly clear if it was.) If not, this could avoid erroring out despite the state that we want to sync being completely valid.(Also, is it possible to get
gapps upload
to output any sort of error message about why it fails?)