When calling gws script scripts run, the scriptId passed via --params is percent-encoded in the URL path, turning - into %2D and _ into %5F. These are unreserved characters per RFC 3986 and should not be encoded. The resulting URL is rejected by the Apps Script Execution API with 404.
Steps to reproduce
gws script scripts run \
--params '{"scriptId":"1-ukYIb8XjT9KQlsj6_NbryM5UJXBwAMeY5GKtSBA05csXty3iY7DhO-P"}' \
--json '{"function":"myFunction","devMode":true}' \
--dry-run
Expected URL
https://script.googleapis.com/v1/scripts/1-ukYIb8XjT9KQlsj6_NbryM5UJXBwAMeY5GKtSBA05csXty3iY7DhO-P:run
Actual URL
https://script.googleapis.com/v1/scripts/1%2DukYIb8XjT9KQlsj6%5FNbryM5UJXBwAMeY5GKtSBA05csXty3iY7DhO%2DP:run
Result: API returns 404 Requested entity was not found, even though the same scriptId works correctly with gws script projects get.
Note: gws script projects get --params '{"scriptId":"..."}' works fine — the path encoding issue appears to be specific to the scripts run endpoint.
Version
gws 0.22.5
When calling
gws script scripts run, thescriptIdpassed via--paramsis percent-encoded in the URL path, turning-into%2Dand_into%5F. These are unreserved characters per RFC 3986 and should not be encoded. The resulting URL is rejected by the Apps Script Execution API with 404.Steps to reproduce
Expected URL
Actual URL
Result: API returns
404 Requested entity was not found, even though the samescriptIdworks correctly withgws script projects get.Note:
gws script projects get --params '{"scriptId":"..."}'works fine — the path encoding issue appears to be specific to thescripts runendpoint.Version
gws 0.22.5