diff --git a/.gitignore b/.gitignore index 78396a0..6fef430 100644 --- a/.gitignore +++ b/.gitignore @@ -10,4 +10,6 @@ fnm.install .DS_Store *.install .tmp -docs/screen_recording \ No newline at end of file +docs/screen_recording +.idea +.fnmTmp \ No newline at end of file diff --git a/feature_tests/almost-matching-dotfiles/.node-version b/feature_tests/almost-matching-dotfiles/.node-version new file mode 100644 index 0000000..933dbb1 --- /dev/null +++ b/feature_tests/almost-matching-dotfiles/.node-version @@ -0,0 +1 @@ +11.10.0 diff --git a/feature_tests/almost-matching-dotfiles/.nvmrc b/feature_tests/almost-matching-dotfiles/.nvmrc new file mode 100644 index 0000000..6af635d --- /dev/null +++ b/feature_tests/almost-matching-dotfiles/.nvmrc @@ -0,0 +1 @@ +v11.10.0 diff --git a/feature_tests/almost-matching-dotfiles/run.sh b/feature_tests/almost-matching-dotfiles/run.sh new file mode 100755 index 0000000..b5850c2 --- /dev/null +++ b/feature_tests/almost-matching-dotfiles/run.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +#set -e + +eval $(fnm env) +fnm install +fnm use + +echo node --version +if [ "$(node --version)" != "v11.10.0" ]; then + echo "Expected Node version is not v11.10.0!" + exit 1 +fi diff --git a/library/Dotfiles.re b/library/Dotfiles.re index 2972c67..75ebc82 100644 --- a/library/Dotfiles.re +++ b/library/Dotfiles.re @@ -20,7 +20,7 @@ let getVersion = () => { switch (nodeVersion, nvmrc) { | (None, None) => Lwt.fail(Version_Not_Provided) - | (Some(v1), Some(v2)) when v1 != v2 => + | (Some(v1), Some(v2)) when Versions.format(v1) != Versions.format(v2) => Lwt.fail(Conflicting_Dotfiles_Found(v1, v2)) | (Some(version), Some(_)) | (Some(version), None)