Skip to content

Commit

Permalink
feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
emily-shen committed Nov 13, 2024
1 parent da936bf commit 48829ca
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion packages/wrangler/src/docs/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { defineCommand } from "../core";
import { logger } from "../logger";
import * as metrics from "../metrics";
import openInBrowser from "../open-in-browser";
import { runSearch } from "./helpers";

Expand All @@ -24,7 +25,7 @@ defineCommand({
},
},
positionalArgs: ["search"],
async handler(args) {
async handler(args, { config }) {
//if no command is provided, open the docs homepage
//or, if a command IS provided, but we can't find anything, open the docs homepage
let urlToOpen =
Expand All @@ -45,5 +46,8 @@ defineCommand({

logger.log(`Opening a link in your default browser: ${urlToOpen}`);
await openInBrowser(urlToOpen);
await metrics.sendMetricsEvent("view docs", {
sendMetrics: config.send_metrics,
});
},
});
2 changes: 1 addition & 1 deletion packages/wrangler/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ import {
import { generateHandler, generateOptions } from "./generate";
import { hyperdrive } from "./hyperdrive/index";
import { initHandler, initOptions } from "./init";
import "./docs";
import "./kv";
import "./workflows";
import "./user/commands";
import "./docs";
import { demandSingleValue } from "./core";
import { logBuildFailure, logger, LOGGER_LEVELS } from "./logger";
import { mTlsCertificateCommands } from "./mtls-certificate/cli";
Expand Down

0 comments on commit 48829ca

Please sign in to comment.