This commit is contained in:
Trym Lund Flogard
2021-06-05 13:30:57 +02:00
parent 02b35dd9a1
commit a5df11eaca
4 changed files with 9 additions and 3 deletions

View File

@ -193,8 +193,10 @@ export class NextcloudClient {
})
const result = await res.text()
core.debug(`Share response: ${result}`)
const re = /<url>(?<share_url>.*)<\/url>/
const match = re.exec(result)
core.debug(`Match groups:\n${JSON.stringify(match?.groups)}`)
const sharableUrl = (match?.groups || {})['share_url']
if (!sharableUrl) {
throw new Error('Failed to parse sharable URL.')