New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue adding speakers with script #13876
Comments
Putting in my comments from Slack in here: It looks like its coming out of Specifically here: + escaped_rhs='Kansas City'
+ file=../content/events/2024-kansas-city/speakers.md
+ [[ -w ../content/events/2024-kansas-city/speakers.md ]]
+ sed -i 's/CITY/Kansas City/' ../content/events/2024-kansas-city/speakers.md
sed: 1: "../content/events/2024- ...": invalid command code . The script calls function devopsdays-web/utilities/common_code Lines 22 to 41 in 07eb28b
The same file has some sed detection logic which is going unused. devopsdays-web/utilities/common_code Lines 7 to 18 in 07eb28b
Using the diff --git a/utilities/common_code b/utilities/common_code
index 3903c0b46c..c8592c0b1d 100644
--- a/utilities/common_code
+++ b/utilities/common_code
@@ -33,7 +33,8 @@ string_replace() {
if [[ -w "${file}" ]] ; then
# sed -i'' should work for macos and linux equally.
- sed -i'' "s/${escaped_lhs}/${escaped_rhs}/" "${file}"
+ # sed -i'' "s/${escaped_lhs}/${escaped_rhs}/" "${file}"
+ sedcmd "s/${escaped_lhs}/${escaped_rhs}/" "${file}"
else
echo "WARNING: ${file} not writeable"
return 1 Output: + escaped_rhs='Kansas City'
+ file=../content/events/2024-kansas-city/speakers.md
+ [[ -w ../content/events/2024-kansas-city/speakers.md ]]
+ sedcmd 's/CITY/Kansas City/' ../content/events/2024-kansas-city/speakers.md
uname
++ uname
+ local osname=Darwin
which sed
++ which sed
+ local gnused=/usr/bin/sed
+ [[ Darwin == \L\i\n\u\x ]]
+ [[ Darwin == \D\a\r\w\i\n ]]
+ [[ /usr/bin/sed == \/\u\s\r\/\l\o\c\a\l\/\b\i\n\/\s\e\d ]]
+ sed -i '' 's/CITY/Kansas City/' ../content/events/2024-kansas-city/speakers.md
# Prompt for inputting speakers
while [ 1 ]
do
echo "Entering speakers; use CTRL+C to stop..." Before I submit a PR, would be good to get context from @mattstratton and @rexroof, as this change was introduced in 3d92859. |
I don't know what the change was for, so I can't weigh in, but probably safe to revert it? |
I added this general solution so that the script could support replacement strings that contained numerous special characters. it is possible it was only tested on linux. |
Yeah I am on MacOS so that could explain it @rexroof |
I'm trying to add our speakers, and getting the following error:
Anyone else seeing this? It will create the folder
speakers
but errors out I'm guessing here since it doesn't create the filedevopsdays-web/utilities/add_speakers.sh
Line 35 in 9cc902e
The text was updated successfully, but these errors were encountered: