t3n/tenantDid/wasmComponent are already in scope from earlier in the same file):
The delimiter must be quoted —
<< 'EOF', not << EOF. TypeScript’s non-null assertion operator (process.env.T3N_API_KEY!) contains a bare !, and bash’s interactive history expansion treats an unquoted ! as “repeat a previous command,” failing with -bash: !: event not found. Quoting the delimiter turns off expansion for everything inside the block. This bites people even inside a correctly-shaped cat << EOF if the quotes were dropped — always 'EOF'.Alternative: turn off history expansion for the whole session
Alternative: turn off history expansion for the whole session
If you’d rather not think about quoting every time, disable the feature that causes it, once per shell session:After that,
<< EOF and << 'EOF' behave identically for the rest of the session, and pasting a bare ! anywhere no longer triggers event not found. This doesn’t fix the separate “pasted at the prompt instead of into a heredoc” mistake above — only quoting (or a heredoc at all) does that.