mksourcedir

chezmoi source-path
cmpenv stdout golden/source-path

chezmoi source-path $HOME${/}.file
cmpenv stdout golden/source-path-file

! chezmoi source-path $HOME${/}.newfile
stderr 'not in source state'

! chezmoi source-path $WORK${/}etc${/}passwd
stderr 'not in'

-- golden/source-path --
$CHEZMOISOURCEDIR
-- golden/source-path-file --
$CHEZMOISOURCEDIR/dot_file
