cmdfun icon indicating copy to clipboard operation
cmdfun copied to clipboard

cmd_is_installed fails if no utils defined

Open snystrom opened this issue 4 years ago • 1 comments

Because cmd_is_installed calls util = TRUE, if no utils, get error. This really highlights how this is a bad design choice to begin with #22.

my_fun <- cmd_search_path("~/my/path")
is_installed <- cmd_is_installed(my_fun)
is_installed()

Error in util == TRUE : 
  comparison (1) is possible only for atomic and list types

Tests to add

  • [ ] path search w/ no utils -> is_installed()

snystrom avatar Oct 26 '20 13:10 snystrom

Hotfix could be if util == TRUE -> return everything even if no utils?

snystrom avatar Oct 26 '20 15:10 snystrom