We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5582117 commit 268456bCopy full SHA for 268456b
1 file changed
.github/workflows/build.yml
@@ -38,7 +38,11 @@ jobs:
38
run: "sed -i '/window.FormData/i window = { FormData: {} }' build/httpsnippet-bundle.js"
39
40
- name: Fix HTTPSnippet export fail issue
41
- run: "sed -i '/})();/i window.HTTPSnippet = HTTPSnippet' build/httpsnippet-bundle.js"
+ run: |
42
+ LINE=$(awk '/var\s+HTTPSnippet/{print NR}' build/httpsnippet-bundle.js)
43
+ echo 'HTTPSnippet line =', $LINE
44
+ sed -i -e "1,$LINE p" -e "$((LINE+1)),\$"'!d;/})();/i window.HTTPSnippet = HTTPSnippet' build/httpsnippet-bundle.js
45
+
46
47
- name: Publish script to a branch
48
uses: EndBug/add-and-commit@v9 # You can change this to use a specific version.
0 commit comments