Fix crash when creating a project without a proprietary or no license.
This commit is contained in:
parent
73abd6af5f
commit
07fbd871cd
Binary file not shown.
@ -47,7 +47,7 @@
|
||||
|
||||
-record(project,
|
||||
{type = none :: none | app | lib | cli | gui | escript,
|
||||
license = none :: none | none | undefined | string(),
|
||||
license = none :: none | none | skip | string(),
|
||||
name = none :: none | string(),
|
||||
desc = none :: none | string(),
|
||||
repo_url = none :: none | string(),
|
||||
@ -1617,6 +1617,7 @@ substitute(Cooked, []) ->
|
||||
unicode:characters_to_binary(Cooked, utf8).
|
||||
|
||||
|
||||
license(skip) -> "";
|
||||
license("") -> "";
|
||||
license(Title) -> "-license(\""++ Title ++ "\").".
|
||||
|
||||
@ -2396,7 +2397,7 @@ ask_license() ->
|
||||
{"[skip and leave blank]", skip}],
|
||||
case zx_tty:select(Options) of
|
||||
skip ->
|
||||
"";
|
||||
skip;
|
||||
proprietary ->
|
||||
Notice =
|
||||
"~nNOTE ON PROPRIETARY USE~n"
|
||||
@ -2406,7 +2407,7 @@ ask_license() ->
|
||||
"If not (mostly when deploying client-side code that links to ZX or "
|
||||
"other GPL/dual-license libraries), Zomp/ZX should be dual-licensed.~n",
|
||||
ok = io:format(Notice),
|
||||
"";
|
||||
skip;
|
||||
License ->
|
||||
License
|
||||
end.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user