diff options
| author | dacctal <dacctal@symlinx.net> | 2026-05-02 09:20:36 +0000 |
|---|---|---|
| committer | dacctal <dacctal@symlinx.net> | 2026-05-02 09:20:36 +0000 |
| commit | 979a9571b7118822e67735654b36498fb8010c2a (patch) | |
| tree | 61774c2b653464c1d5e1fb02917c62b40421cf71 | |
| parent | ac6c1dfd676eedca3e1b3c4d5c3b0ecf32fc1539 (diff) | |
clumsy me, flipping values for no good reason
| -rw-r--r-- | src/create_pkg.cc | 1 | ||||
| -rw-r--r-- | src/lua_state.cc | 13 |
2 files changed, 5 insertions, 9 deletions
diff --git a/src/create_pkg.cc b/src/create_pkg.cc index 4729923..58e077f 100644 --- a/src/create_pkg.cc +++ b/src/create_pkg.cc @@ -24,7 +24,6 @@ Pkg create_pkg(std::string arg, const char* target) { pkg.url = arg; pkg.name = name_from_url(arg); } else if (arg == ".") { - std::cout << "this pkg is local" << std::endl; pkg.url = ""; pkg.src = std::filesystem::current_path().string(); pkg.name = name_from_url(std::filesystem::current_path().string()); diff --git a/src/lua_state.cc b/src/lua_state.cc index 5e79fdd..919a304 100644 --- a/src/lua_state.cc +++ b/src/lua_state.cc @@ -106,7 +106,7 @@ bool repo_build(const char *repository) { } bool bldit(const char *target) { - lua_State *B = luaL_newstate(); + lua_State* B = luaL_newstate(); luaL_openlibs(B); if (luaL_loadfile(B, "bldit.lua") || lua_pcall(B, 0, 0, 0)) { std::cout << print_warning << "cannot run bldit script: " << lua_tostring(B, -1) << "\n"; @@ -119,18 +119,15 @@ bool bldit(const char *target) { } std::cout << print_pkgit << "bldit variable 'targets' used successfully.\n"; lua_getfield(B, -1, target); - if (!lua_istable(L, -1)) { - std::cout << print_warning << "bldit variable '" << target - << "' is not a table.\n"; + if (!lua_istable(B, -1)) { + std::cout << print_warning << "bldit variable '" << target << "' is not a table.\n"; lua_pop(B, 2); return false; } - std::cout << print_pkgit << "bldit variable '" << target - << "' used successfully.\n"; + std::cout << print_pkgit << "bldit variable '" << target << "' used successfully.\n"; lua_getfield(B, -1, "build"); if (!lua_isfunction(B, -1)) { - std::cout << "'repositories' lua variable 'build' is not a function." - << std::endl; + std::cout << "'repositories' lua variable 'build' is not a function." << std::endl; lua_pop(B, 3); return false; } |
