Skip to content

Commit

Permalink
Fix --clean option
Browse files Browse the repository at this point in the history
Previously this was not working due to this error:

```
ruby/3.1.4/lib/ruby/3.1.0/fileutils.rb:637:in `rm_rf': wrong number of arguments (given 2, expected 1) (ArgumentError)
	from extconf.rb:33:in `<main>'
```

Also update the documentation to reflect that --clean is not enabled
by default.
  • Loading branch information
stanhu authored and ueno committed Sep 14, 2023
1 parent 0d2f685 commit 0ce6037
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions ext/gpgme/extconf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

# Available options:
#
# --enable-clean (default)
# --disable-clean
# --enable-clean
# --disable-clean (default)
#
# This file is largely based on Nokogiri's extconf.rb.

Expand All @@ -25,12 +25,12 @@

# clean the ports build directory
Pathname.glob(pwd.join('tmp', '*', 'ports')) { |dir|
FileUtils.rm_rf(dir, { :verbose => true })
FileUtils.rmdir(dir.parent, { :parents => true, :verbose => true })
FileUtils.rm_rf(dir, verbose: true)
FileUtils.rmdir(dir.parent, parents: true, verbose: true)
}

# ports installation can be safely removed if statically linked.
FileUtils.rm_rf(root + 'ports', { :verbose => true })
FileUtils.rm_rf(root + 'ports', verbose: true)
end

exit
Expand Down

0 comments on commit 0ce6037

Please sign in to comment.