mirror of
https://github.com/pesde-pkg/pesde.git
synced 2024-12-12 11:00:36 +00:00
feat: inform user about not finding any bin package when invoking from bin
This commit is contained in:
parent
43a8d6272a
commit
e430bdf89f
2 changed files with 7 additions and 1 deletions
|
@ -6,6 +6,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [Unreleased]
|
||||
### Added
|
||||
- Inform user about not finding any bin package when using its bin invocation by @daimond113
|
||||
|
||||
### Fixed
|
||||
- Fix `self-upgrade` overwriting its own binary by @daimond113
|
||||
- Allow use of Luau packages in `execute` command by @daimond113
|
||||
|
|
|
@ -51,6 +51,7 @@ fn bin_link_file(alias: &str) -> String {
|
|||
format!(
|
||||
r#"{prefix}local process = require("@lune/process")
|
||||
local fs = require("@lune/fs")
|
||||
local stdio = require("@lune/stdio")
|
||||
|
||||
local project_root = process.cwd
|
||||
local path_components = string.split(string.gsub(project_root, "\\", "/"), "/")
|
||||
|
@ -68,9 +69,11 @@ for _, packages_folder in {{ {all_folders} }} do
|
|||
|
||||
if fs.isFile(path) then
|
||||
require(path)
|
||||
break
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
stdio.ewrite(stdio.color("red") .. "binary `{alias}` not found. are you in the right directory?" .. stdio.color("reset") .. "\n")
|
||||
"#,
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue