We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 83ca2fc + 5c6d2d8 commit 1717fa9Copy full SHA for 1717fa9
1 file changed
user/item.go
@@ -4,6 +4,8 @@ import (
4
"io/ioutil"
5
"os"
6
"path/filepath"
7
+ "runtime"
8
+ "strings"
9
10
"github.com/exercism/cli/api"
11
)
@@ -59,6 +61,10 @@ func (it *Item) Save() error {
59
61
it.isUpdated = true
60
62
}
63
64
+ if runtime.GOOS == "windows" {
65
+ text = strings.Replace(text, "\n", "\r\n", -1)
66
+ }
67
+
68
if err := ioutil.WriteFile(file, []byte(text), 0644); err != nil {
69
return err
70
0 commit comments