anchor.diff:      exit(0);
     }
   
  -  if (args["sdk-root"] == null) {
  +  env.sdkRoot = args["sdk-root"];
  +  if (env.sdkRoot == null) {
       if (Platform.environment.containsKey("SDK_ROOT")) {
         env.sdkRoot =
           join(absolute(normalize(Platform.environment["SDK_ROOT"])), "lib");
  -    } else {
  -      fail("No SDK root found, please specify one using --sdk-root.");
       }
     } else {
  -    env.sdkRoot = join(absolute(normalize(args["sdk-root"])), "lib");
  -  }
  -  if (!FileSystemEntity.isDirectorySync(env.sdkRoot)) {
  +    env.sdkRoot = join(absolute(normalize(env.sdkRoot)), "lib");
  +  }
  +  if ((env.sdkRoot != null) && !FileSystemEntity.isDirectorySync(env.sdkRoot)) {
       fail("Provided SDK root '${args["sdk-root"]}' is not a valid SDK "
            "top-level directory");
     }
   
  -  if (args["package-root"] == null) {
  -    env.pkgRoot = absolute(normalize("./packages"));
  -  } else {
  +  env.pkgRoot = args["package-root"];
  +  if (env.pkgRoot != null) {
       env.pkgRoot = absolute(normalize(args["package-root"]));
       if (!FileSystemEntity.isDirectorySync(env.pkgRoot)) {
         fail("Provided package root '${args["package-root"]}' is not directory.");
  
positive.code:       return filePath;
      }
      if (import.startsWith(PACKAGE_PREFIX)) {
        var filePath =
            "${_env["pkgRoot"]}"
            "/${import.substring(PACKAGE_PREFIX.length, import.length)}"; 
  
negative.code:   parser.addOption("sdk-root", abbr: "s",
                     help: "path to the SDK root");
    parser.addOption("package-root", abbr: "p",
                     help: "path to the package root");
    parser.addOption("in", abbr: "i",
                     help: "input(s): may be file or directory");
    parser.addOption("out", abbr: "o",
  