make:*, plugin:add and new inserted toolchain go1.27.0 into go.mod and go.work whenever that exact line was missing. A file that already named another toolchain (go mod tidy and go work use write the running one) ended up with two toolchain lines, and Go refused to load it with "repeated toolchain statement". ensureToolchain now keeps an existing line, replaces it only when it names an older toolchain, and inserts one only when there is none.
1.3 KiB
1.3 KiB