package core

import "path/filepath"

// RelOrFull returns target relative to base when possible,
// otherwise returns target unchanged.
func RelOrFull(base, target string) string {
	rel, err := filepath.Rel(base, target)
	if err != nil {
		return target
	}
	return rel
}
