UNPKG

635 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3const jsonInstruction_1 = require("../jsonInstruction");
4class Copy extends jsonInstruction_1.JSONInstruction {
5 constructor(document, range, dockerfile, escapeChar, instruction, instructionRange) {
6 super(document, range, dockerfile, escapeChar, instruction, instructionRange);
7 }
8 stopSearchingForFlags(argument) {
9 return argument.indexOf("--") === -1;
10 }
11 getFromFlag() {
12 let flags = super.getFlags();
13 return flags.length === 1 && flags[0].getName() === "from" ? flags[0] : null;
14 }
15}
16exports.Copy = Copy;