{"version":"2.1.332","anchor":"repl-script-path-handling-for","canonical_anchor":"repl-script-path-handling-for","heading":"Scripts no longer create a folder literally named ~ by mistake","tier":"notice","area":"Scripts","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.332\/e\/repl-script-path-handling-for","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.332","markdown":"### Scripts no longer create a folder literally named ~ by mistake\n\nScripts that pass ~ in a path without spelling it out get a warning, and writes to a path where ~ was not expanded are refused\n\n**What**\n\nClaude Code can write and run small scripts that call its tools. In a file path, `~` is shorthand for your home folder. Claude Code now checks how scripts use it:\n\n- A script that passes `~` without typing it directly into the script gets the warning \"~ was read as a folder in the working directory.\"\n\n- A write to a path that still contains an unexpanded `~`, or that starts with spaces, is refused with \"Nothing was written: ~ isn't expanded in this path.\"\n\nTo point at the home folder, the script should start the path with text typed into the script itself, such as `'~\/'`.\n\n**Why**\n\nWithout this check, a script could create a folder actually named `~` inside your project folder and write files there, rather than writing into your home folder as intended.\n\n- Area: Scripts\n- Tier: You'll notice\n- Useful: 2\/5\n- Signal: 1\/5\n- Scope: individual\n- Heads-up: no"}