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