gpt4 book ai didi

dart - Dart pub 工具的返回码是什么

转载 作者:行者123 更新时间:2023-12-03 02:44:45 26 4
gpt4 key购买 nike

我将在批处理文件中迭代启动“pub get”和“pub build”,我需要测试错误的返回码。 Dart 文档中似乎没有记录返回码。有谁知道它们是什么,或者它们记录在哪里?

最佳答案

我找到了这些:

  • 搜索pub.dart for 'exit_codes' 查看使用了哪些常量
  • 常量值在这里定义:(从 exit_codes.dart 复制)
// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

/// Exit code constants. From [the BSD sysexits manpage][manpage]. Not every
/// constant here is used, even though some of the unused ones may be
/// appropriate for errors encountered by pub.
///
/// [manpage]: http://www.freebsd.org/cgi/man.cgi?query=sysexits
library pub.exit_codes;

/// The command completely successfully.
const SUCCESS = 0;

/// The command was used incorrectly.
const USAGE = 64;

/// The input data was incorrect.
const DATA = 65;

/// An input file did not exist or was unreadable.
const NO_INPUT = 66;

/// The user specified did not exist.
const NO_USER = 67;

/// The host specified did not exist.
const NO_HOST = 68;

/// A service is unavailable.
const UNAVAILABLE = 69;

/// An internal software error has been detected.
const SOFTWARE = 70;

/// An operating system error has been detected.
const OS = 71;

/// Some system file did not exist or was unreadable.
const OS_FILE = 72;

/// A user-specified output file cannot be created.
const CANT_CREATE = 73;

/// An error occurred while doing I/O on some file.
const IO = 74;

/// Temporary failure, indicating something that is not really an error.
const TEMP_FAIL = 75;

/// The remote system returned something invalid during a protocol exchange.
const PROTOCOL = 76;

/// The user did not have sufficient permissions.
const NO_PERM = 77;

/// Something was unconfigured or mis-configured.
const CONFIG = 78;

关于dart - Dart pub 工具的返回码是什么,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22360809/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com