Open mrmarbury opened 12 years ago
I digged some more and found out the following ... It doesn't return an error, it just returns true
Here's a sequence of executions in irb that shows what's weird:
ssh.file_exists? '/etc/apache/vhosts.d/config-ssl.conf.ORIGINAL'
ls: /etc/apache/vhosts.d/config-ssl.conf.ORIGINAL: No such file or directory
=> true
irb(main):047:0> ssh.file_exists? '/etc/apache/vhosts.d/config-ssl.conf.ORIGINAL'
ls: /etc/apache/vhosts.d/config-ssl.conf.ORIGINAL: No such file or directory
=> true
irb(main):048:0> ssh.file_exists? '/etc/apache/vhosts.d/config-ssl.conf.ORIGINAL'
ls: /etc/apache/vhosts.d/config-ssl.conf.ORIGINAL: No such file or directory
=> true
irb(main):049:0> ssh.file_exists? '/etc/apache/vhosts.d/config-ssl.conf.ORIGINAL'
ls: => false
irb(main):050:0> ssh.file_exists? '/etc/apache/vhosts.d/config-ssl.conf.ORIGINAL'
ls: => false
irb(main):051:0> ssh.file_exists? '/etc/apache/vhosts.d/config-ssl.conf.ORIGINAL'
ls: /etc/apache/vhosts.d/config-ssl.conf.ORIGINAL
=> false
irb(main):052:0> ssh.file_exists? '/etc/apache/vhosts.d/config-ssl.conf.ORIGINAL'
ls: /etc/apache/vhosts.d/config-ssl.conf.ORIGINAL
=> false
irb(main):053:0> ssh.file_exists? '/etc/apache/vhosts.d/config-ssl.conf.ORIGINAL'
ls: /etc/apache/vhosts.d/config-ssl.conf.ORIGINAL: No such file or directory
=> true
irb(main):054:0> ssh.file_exists? '/etc/apache/vhosts.d/config-ssl.conf.ORIGINAL'
ls: /etc/apache/vhosts.d/config-ssl.conf.ORIGINAL
=> false
irb(main):055:0> ssh.file_exists? '/etc/apache/vhosts.d/config-ssl.conf.ORIGINAL'
ls: /etc/apache/vhosts.d/config-ssl.conf.ORIGINAL: No such file or directory
=> true
The file is definitely not existing on the system.
Thanks for the report. The file_*
commands have some funky code to work around some challenges in net-ssh/net-sftp. I'll take a look in the next release.
Hi, I have a problem with rye on SLES10.
When calling
file_exists?
it sometimes returns an error when the file does not exist. But since I use quiet mode and the method itself executes quitely, this shouldn't happen, I guess? Since I want to execute an action, if the file does not exist, this is kind of annoyingThe Rye versions I've tried so far are 0.9.6 and 0.9.7. The Ruby version is 1.9.3p125
Interesting thing is that it's working with SLES 11 and the exact same versions of ruby and rye.
The way I'm using it is this:
When calling Rye::Box.new, I'm setting
quiet: true
Maybe you have an idea?
Thx alot, Stefan