Skip to content

Commit 6035d77

Browse files
committed
Merge pull request #5 from jasonblewis/fileutils
added require fileutils and change File.copy to FileUtils.copy
2 parents 1d9444d + 0c6ade2 commit 6035d77

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

bin/ssh-config

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/usr/bin/env ruby
2+
require 'fileutils'
23
require File.expand_path(File.join(File.dirname(__FILE__), '..', 'lib', 'ssh-config'))
34

45
# ssh-config - Manipulate config values in the .ssh/config file.

lib/config_file.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ def save
155155
end
156156

157157
def backup
158-
File.copy(File.expand_path("~/.ssh/config"), File.expand_path("~/.ssh/config~"))
158+
FileUtils.copy(File.expand_path("~/.ssh/config"), File.expand_path("~/.ssh/config~"))
159159
end
160160

161161
private

0 commit comments

Comments
 (0)