Files
bun.sh/src/cli/package_manager_command.zig
Jarred Sumner e75c711c68 Upgrade to latest Zig, remove dependency on patched version of Zig (#96)
* Prepare to upgrade zig

* zig fmt

* AllocGate

* Update data_url.zig

* wip

* few files

* just headers now?

* I think everything works?

* Update mimalloc

* Update hash_map.zig

* Perf improvements to compensate for Allocgate

* Bump

* 📷

* Update bun.lockb

* Less branching

* [js parser] Slightly reduce memory usage

* Update js_parser.zig

* WIP remove unused

* [JS parser] WIP support for `with` keyword

* Remove more dead code

* Fix all the build errors!

* cleanup

* Move `network_thread` up

* Bump peechy

* Update README.md
2021-12-30 21:12:32 -08:00

25 lines
699 B
Zig

const Command = @import("../cli.zig").Command;
const PackageManager = @import("../install/install.zig").PackageManager;
const std = @import("std");
const strings = @import("strings");
pub const PackageManagerCommand = struct {
pub fn printHelp(_: std.mem.Allocator) void {}
pub fn exec(ctx: Command.Context) !void {
var args = try std.process.argsAlloc(ctx.allocator);
args = args[1..];
var first = std.mem.span(args[0]);
if (strings.eqlComptime(first, "pm")) {
args = args[1..];
}
if (args.len == 0) {
printHelp(ctx.allocator);
std.os.exit(0);
}
first = std.mem.span(args[0]);
}
};