Skip to content
This repository has been archived by the owner on Nov 6, 2024. It is now read-only.

/etc/vimrc has Windows line endings "^M" #50

Closed
Dumbaz opened this issue Apr 20, 2017 · 4 comments
Closed

/etc/vimrc has Windows line endings "^M" #50

Dumbaz opened this issue Apr 20, 2017 · 4 comments

Comments

@Dumbaz
Copy link

Dumbaz commented Apr 20, 2017

I am currently using the icinga2x/ box and ran into this small problem.

[root@icinga2 ~]# vim /etc/yum.conf
Error detected while processing /etc/vimrc:
line    3:
E492: Not an editor command: ^M
line    4:
E492: Not an editor command: ^M
line    5:
E488: Trailing characters: nocompatible^M
line    6:
E492: Not an editor command: ^M
line    7:
E492: Not an editor command: ^M
line    8:
E492: Not an editor command: ^M
line    9:
E492: Not an editor command: ^M
line   10:
E15: Invalid expression: has("syntax")^M
line   58:
E171: Missing :endif
Press ENTER or type command to continue

Deleting the line endings fixed the problem

I am on the current master branch

.../icinga-vagrant (master)
$ git status
On branch master
Your branch is up-to-date with 'origin/master'.
nothing to commit, working directory clean

The file does not seem to be configured during the puppet run or stem from the \icinga2x\files folder, so it it probably has to be changed in the http://boxes.icinga.com/centos-71-x64-vbox.box itself.

Windows 8.1 Host, VirtualBox Provider

@dnsmichi
Copy link
Contributor

puppet-vim is managing the vimrc file, and as such uses the template file from your local Windows host. Since you've cloned that on Windows, I bet you forgot to set the crlf settings mentioned in the README file.

Can you please share the first two lines of /etc/vimrc in your Vagrant box?

@Dumbaz
Copy link
Author

Dumbaz commented Apr 21, 2017

You´re probably right. Had no time to look into it yet, but here are the first 2 lines

" vimrc: Managed by puppet - DO NOT EDIT
" Changes manually to this file can, and will, be lost


set nocompatible

@Dumbaz
Copy link
Author

Dumbaz commented Apr 27, 2017

As outlined in the Readme, I did not have this problem when I set the git option for line endings.

git.exe config --global core.autocrlf false before cloning the repository.

@Dumbaz Dumbaz closed this as completed Apr 27, 2017
@dnsmichi
Copy link
Contributor

Thanks for the feedback. I have tested that on Windows and have some changes pending for the docs to make it more clear. Also how to have that set during the Git installer dialog.

pull bot pushed a commit to woakes070048/icinga-vagrant that referenced this issue Sep 26, 2023
292ff33 Merge pull request Icinga#52 from tosmi/readme
db2b4d6 Update README.md
477c375 Merge pull request Icinga#50 from stahnma/metadata
7cee494 Update project url and source to use HTTPS
724e02d Add dep on stdlib
b473570 Ready for 1.2.1
1b9951f Merge pull request Icinga#47 from rstory/master
3bb8a46 Merge pull request Icinga#48 from rnelson0/strictvars
ce18bc6 To pass strict variable checks with the future parser, facts are quoted so when not available they resolve to the empty string instead of undef.
94bfb3f support for facter 1.6 (used in epel 6 puppet)
bd06e97 Whitespace in the README
5f2413f Merge pull request Icinga#46 from rnelson0/lint
3b813bc Clear errors left over from PR42   Ignore lint warning about selector.   Two rspec rubocop errors.
65bd741 Readying READE and metadata.json for 1.2.0
fbc6635 Removes mirrorlist when baseurl is specified
8c6481c Merge branch 'number33'
d5e090e Force GPG key id to be short during rpm check
62a33f1 Merge pull request Icinga#45 from rnelson0/updatedchecks
8427310 Further Travis CI tweaks:   Use sudo: false to enable the new container infrastructure via Travis CI   Replace 'ruby-head' with '2.1.0' as ruby-head has dependency issues with Travis CI   Enable bundler caching   Exclude ruby 2.1.0 and puppet < 3.5.0 in the matrix
e822bc3 Ensure all tests pass
1986921 Import puppet-module-skeleton files
8f257ed Merge pull request Icinga#44 from rnelson0/travisversions
5ddf395 Fix split errors
e214c56 (GH43) Update Travis CI to test newer Puppet versions   Update the matrix   Filter out more files in .gitignore
52ecd5d Readying for 1.1.1
d9aa54a Force GPG key id to be short during rpm check
370922e Ready metadata for 1.1.0 release
5d010a0 (maint) Fix up spec tests to expect https by default
eb1b79f Merge branch 'master' of github.com:stahnma/puppet-module-epel
8d72e0f Merge pull request Icinga#35 from mcanevet/feature/exclude_includepkgs
9b43197 Readying README for 1.1.0
9953560 Fix up whitespace in some specs
b8d79a5 Add https to default urls
919dd47 Add exclude and includepkgs to every repo
a41412e Add exclude and includepkgs to every repo

git-subtree-dir: modules/epel
git-subtree-split: 292ff3311d5348a2449a53f8643dd20e43be52f1
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants