Move and correct defn

The salient difference is that it uses -x when testing.
This commit is contained in:
Michael Wolf
2023-09-30 19:03:40 -06:00
parent 973b9e4c2f
commit 2aa478eea6

View File

@@ -103,18 +103,6 @@ function custom_sniff() {
fi
}
function custom_formatter() {
root="$1"
file_type="$2"
maybe="$root/.would-reformat/$file_type"
if [[ -f "$maybe" ]]; then
echo "$maybe"
return
fi
echo "use-default"
}
## WOULD_FORMAT_PROJECT_ROOT=$(project_root $1)
@@ -165,6 +153,19 @@ function sniff_file_type() {
echo $file_type
}
function custom_formatter() {
root="$1"
file_type="$2"
maybe="$root/.would-reformat/$file_type"
if [[ -x "$maybe" ]]; then
echo -n "$maybe"
return
fi
echo ""
}
function choose_wrapper() {
file_type="$1"