Add Util.absolute_path()

This commit is contained in:
Josh Holtrop 2026-01-28 08:18:25 -05:00
parent d38cd2e8fb
commit 319432bc61

View File

@ -16,6 +16,20 @@ module Rscons
end end
end end
# Return the absolute path for a given target if not a phony target.
#
# @param path [String, Symbol]
# Given target name.
#
# @return Absolute path of given target.
def absolute_path(path)
if Rscons.phony_target?(path)
path
else
File.expand_path(path)
end
end
# Colorize a builder run message. # Colorize a builder run message.
# #
# @param message [String] # @param message [String]