ScriptApp.getService().getUrl() 指向开发 URL.我怎样才能让它指向 exec 生产 URL? [英] ScriptApp.getService().getUrl() points to dev URL. How can I get it to point to exec production URL?

查看:16
本文介绍了ScriptApp.getService().getUrl() 指向开发 URL.我怎样才能让它指向 exec 生产 URL?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

ScriptApp.getService().getUrl() 正在生成一个开发 URL.如何让它生成 exec 生产 URL?

ScriptApp.getService().getUrl() is generating a dev URL. How can I make it generate the exec production URL?

推荐答案

这个答案怎么样?请将此视为几种可能的答案之一.

How about this answer? Please think of this as just one of several possible answers.

如果你开启了V8运行时,在当前阶段,似乎当开启V8运行时,ScriptApp.getService().getUrl()返回dev URL,如https://script.google.com/macros/s/###/dev,当 V8 运行时被禁用时,它会返回 exec URL,如 https://script.google.com/macros/s/###/exec.我认为这可能是 V8 的错误之一.

If you are enabling V8 runtime, in the current stage, it seems that when V8 runtime is enabled, ScriptApp.getService().getUrl() returns the dev URL like https://script.google.com/macros/s/###/dev, and when V8 runtime is disabled, it returns the exec URL like https://script.google.com/macros/s/###/exec. I think that this might be one of bugs for V8.

如果您想通过启用 V8 直接检索 exec URL,作为当前的解决方法,如何使用 Apps Script API 中projects.deployments.list 的方法?您可以在试用此 API"中对其进行测试.当然,这可以与 Google Apps Script 一起使用.

If you want to directly retrieve the exec URL with enabling V8, as the current workaround, how about retrieving it using the method of projects.deployments.list in Apps Script API? You can test it at "Try this API". Of course, this can be used with Google Apps Script.

如果我误解了您的情况并且这不是您想要的方向,我深表歉意.

If I misunderstood your situation and this was not the direction you want, I apologize.

这篇关于ScriptApp.getService().getUrl() 指向开发 URL.我怎样才能让它指向 exec 生产 URL?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆