`stmkmf`: fix incorrect `TOP` test when using `-C / `--cd`
authorJan Vrany <jan.vrany@fit.cvut.cz>
Sat, 22 Sep 2018 00:00:27 +0100
changeset 257 c6a3ceed613c
parent 256 a648d3479a60
child 258 65caf0201157
`stmkmf`: fix incorrect `TOP` test when using `-C / `--cd` When testing for `TOP` existence when `-C` / `--cd` is specified, must test it relative to `-C` / `--cd` value, not relative to current directory!
bin/stmkmf.rb
--- a/bin/stmkmf.rb	Fri Sep 21 23:19:25 2018 +0100
+++ b/bin/stmkmf.rb	Sat Sep 22 00:00:27 2018 +0100
@@ -36,7 +36,7 @@
     end
     top = match[1].rstrip()
   end
-  if not File.directory? top then
+  if not File.directory? File.join(cwd, top) then
     require 'pry'
     require 'pry-byebug'
     binding.pry