carpentries / sandpaper

User Interface for The Carpentries Workbench
https://carpentries.github.io/sandpaper
Other
42 stars 27 forks source link

Make sure initial URL defaults is sensible #125

Open zkamvar opened 3 years ago

zkamvar commented 3 years ago

I noticed in an alpha test that one of the testers ended up with a blank field for URL:

https://github.com/elletjies/buoyant-barnacle/commit/96b7ae745cb1669203de87dc89e3ff4846cc3e80#diff-d8d0422389f03d783e32e627250fe29834bd09c6361640d1ff00661dd6820034

I suspect this is due to not having https set up for git, but I can't be sure.

zkamvar commented 3 years ago

This is a bit of an odd one because this is controlled by this code https://github.com/carpentries/sandpaper/blob/17f02d56be89ca4aef1a6b3d7e0c32bff3aca391/R/create_lesson.R#L40-L52

However, the tryCatch() element should default to returning "carpentries" if nothing happens:

tryCatch(stop("can't touch this"), error = function(e) "hammertime")
#> [1] "hammertime"

Created on 2021-05-28 by the reprex package (v2.0.0)

It might mean that this person had trouble with glue?

zkamvar commented 3 years ago

I have another windows data point: https://github.com/tang0008/buoyant-barnacle/blob/25f0c613ab8bdf92bc0e789c1fb1e3dabdb23499/config.yaml#L23